Skip to content

Commit e786cc9

Browse files
committed
QA round 1:
- Refined the implementation to use a combined location format: (agent_info)->ossec-monitord this shortens it from "(agent) 1.2.3.4->ossec-monitord" to "(agent) 1.2.3.4", with the location field still tracked from monitord Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
1 parent 52cdc9f commit e786cc9

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, *cr_agents,
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)