X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Flogcollector%2Fread_fullcommand.c;h=c79eb22771e027e9ab3dbd384fd243466ff51c90;hp=11d256b81ad2e15d501e26617c495b0e01e8f61a;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 diff --git a/src/logcollector/read_fullcommand.c b/src/logcollector/read_fullcommand.c index 11d256b..c79eb22 100755 --- a/src/logcollector/read_fullcommand.c +++ b/src/logcollector/read_fullcommand.c @@ -1,4 +1,5 @@ -/* @(#) $Id$ */ +/* @(#) $Id: ./src/logcollector/read_fullcommand.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2010 Trend Micro Inc. * All right reserved. @@ -47,8 +48,8 @@ void *read_fullcommand(int pos, int *rc, int drop_it) snprintf(str, 256, "ossec: output: '%s':\n", - (NULL != logff[pos].alias) - ? logff[pos].alias + (NULL != logff[pos].alias) + ? logff[pos].alias : logff[pos].command); cmd_size = strlen(str); @@ -58,12 +59,12 @@ void *read_fullcommand(int pos, int *rc, int drop_it) str[cmd_size +n] = '\0'; /* Getting the last occurence of \n */ - if ((p = strrchr(str, '\n')) != NULL) + if ((p = strrchr(str, '\n')) != NULL) { *p = '\0'; } - + debug2("%s: DEBUG: Reading command message: '%s'", ARGV0, str); /* Removing empty lines. */ @@ -87,7 +88,7 @@ void *read_fullcommand(int pos, int *rc, int drop_it) } strfinal[n] = '\0'; - + /* Sending message to queue */ if(drop_it == 0) { @@ -106,7 +107,7 @@ void *read_fullcommand(int pos, int *rc, int drop_it) pclose(cmd_output); - return(NULL); + return(NULL); } /* EOF */