Skip to content

Commit f2b2ddc

Browse files
authored
Merge pull request ossec#2198 from atomicturtle/issue165
Add agent name to disconnected event
2 parents 7caaa78 + e786cc9 commit f2b2ddc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/monitord/monitor_agents.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ void monitor_agents()
4646

4747
/* Send disconnected message */
4848
snprintf(str, OS_SIZE_1024 - 1, OS_AG_DISCON, *cr_agents);
49-
if (SendMSG(mond.a_queue, str, ARGV0,
49+
50+
char refined_location[OS_SIZE_1024 + 1];
51+
snprintf(refined_location, OS_SIZE_1024, "%s->%s", *cr_agents, ARGV0);
52+
53+
if (SendMSG(mond.a_queue, str, refined_location,
5054
LOCALFILE_MQ) < 0) {
5155
merror(QUEUE_SEND, ARGV0);
5256
}

0 commit comments

Comments
 (0)