X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fclient-agent%2Fevent-forward.c;h=633c62f81aad10cd3d044a052ada90564710fab1;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=5e1f920cedda16369f70367aa7e27c8ffa6acaa9;hpb=301048b51990573e58a30dc4a5bb4ec285cad554;p=ossec-hids.git diff --git a/src/client-agent/event-forward.c b/src/client-agent/event-forward.c old mode 100755 new mode 100644 index 5e1f920..633c62f --- a/src/client-agent/event-forward.c +++ b/src/client-agent/event-forward.c @@ -1,5 +1,3 @@ -/* @(#) $Id$ */ - /* Copyright (C) 2009 Trend Micro Inc. * All right reserved. * @@ -9,36 +7,23 @@ * Foundation */ -/* Part of the OSSEC HIDS - * Available at http://www.ossec.net/hids/ - */ - - #include "shared.h" #include "agentd.h" - #include "os_net/os_net.h" - #include "sec.h" - -/* Receives a message locally on the agent and forwards to the - * manager. - */ +/* Receive a message locally on the agent and forward it to the manager */ void *EventForward() { - int recv_b; - char msg[OS_MAXSTR +1]; - + ssize_t recv_b; + char msg[OS_MAXSTR + 1]; - /* Initializing variables */ + /* Initialize variables */ msg[0] = '\0'; msg[OS_MAXSTR] = '\0'; - - while((recv_b = recv(logr->m_queue, msg, OS_MAXSTR, MSG_DONTWAIT)) > 0) - { + while ((recv_b = recv(agt->m_queue, msg, OS_MAXSTR, MSG_DONTWAIT)) > 0) { msg[recv_b] = '\0'; send_msg(0, msg); @@ -46,9 +31,6 @@ void *EventForward() run_notify(); } - return(NULL); + return (NULL); } - - -/* EOF */