X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fclient-agent%2Fstart_agent.c;h=c27dc2eac7a7222b448d5cf083c92326a15cdee8;hp=45fbf9763323ed5a13d4c83bbafae49af51716d1;hb=301048b51990573e58a30dc4a5bb4ec285cad554;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a diff --git a/src/client-agent/start_agent.c b/src/client-agent/start_agent.c index 45fbf97..c27dc2e 100755 --- a/src/client-agent/start_agent.c +++ b/src/client-agent/start_agent.c @@ -1,11 +1,11 @@ -/* @(#) $Id: start_agent.c,v 1.17 2009/12/01 15:40:07 dcid Exp $ */ +/* @(#) $Id$ */ /* Copyright (C) 2009 Trend Micro Inc. * All right reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation */ @@ -39,7 +39,7 @@ int connect_server(int initial_id) if(logr->sock >= 0) { sleep(1); - close(logr->sock); + CloseSocket(logr->sock); logr->sock = -1; if(logr->rip[1]) @@ -159,6 +159,11 @@ void start_agent(int is_startup) memset(cleartext, '\0', OS_MAXSTR +1); memset(fmsg, '\0', OS_MAXSTR +1); snprintf(msg, OS_MAXSTR, "%s%s", CONTROL_HEADER, HC_STARTUP); + + + #ifdef ONEWAY + return; + #endif /* Sending start message and waiting for the ack */