projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.7
[ossec-hids.git]
/
src
/
logcollector
/
read_multiline.c
diff --git
a/src/logcollector/read_multiline.c
b/src/logcollector/read_multiline.c
index
29a565d
..
02d357e
100755
(executable)
--- a/
src/logcollector/read_multiline.c
+++ b/
src/logcollector/read_multiline.c
@@
-1,4
+1,5
@@
-/* @(#) $Id$ */
+/* @(#) $Id: ./src/logcollector/read_multiline.c, 2011/09/08 dcid Exp $
+ */
/* Copyright (C) 2010 Trend Micro Inc.
* All right reserved.
/* Copyright (C) 2010 Trend Micro Inc.
* All right reserved.
@@
-45,11
+46,11
@@
void *read_multiline(int pos, int *rc, int drop_it)
linesgot++;
/* Getting the last occurence of \n */
linesgot++;
/* Getting the last occurence of \n */
- if ((p = strrchr(str, '\n')) != NULL)
+ if ((p = strrchr(str, '\n')) != NULL)
{
*p = '\0';
}
{
*p = '\0';
}
-
+
/* If we didn't get the new line, because the
* size is large, send what we got so far.
*/
/* If we didn't get the new line, because the
* size is large, send what we got so far.
*/
@@
-64,17
+65,17
@@
void *read_multiline(int pos, int *rc, int drop_it)
debug1("%s: Message not complete. Trying again: '%s'", ARGV0,str);
fsetpos(logff[pos].fp, &fp_pos);
break;
debug1("%s: Message not complete. Trying again: '%s'", ARGV0,str);
fsetpos(logff[pos].fp, &fp_pos);
break;
- }
-
+ }
+
#ifdef WIN32
if ((p = strrchr(str, '\r')) != NULL)
{
*p = '\0';
}
#endif
#ifdef WIN32
if ((p = strrchr(str, '\r')) != NULL)
{
*p = '\0';
}
#endif
-
+
debug2("%s: DEBUG: Reading message: '%s'", ARGV0, str);
debug2("%s: DEBUG: Reading message: '%s'", ARGV0, str);
-
+
/* Adding to buffer. */
buffer_size = strlen(buffer);
/* Adding to buffer. */
buffer_size = strlen(buffer);
@@
-86,12
+87,12
@@
void *read_multiline(int pos, int *rc, int drop_it)
strncpy(buffer + buffer_size, str, OS_MAXSTR - buffer_size -2);
strncpy(buffer + buffer_size, str, OS_MAXSTR - buffer_size -2);
-
+
if(linesgot < linecount)
{
continue;
}
if(linesgot < linecount)
{
continue;
}
-
+
/* Sending message to queue */
if(drop_it == 0)
/* Sending message to queue */
if(drop_it == 0)
@@
-124,12
+125,12
@@
void *read_multiline(int pos, int *rc, int drop_it)
}
__ms = 0;
}
}
__ms = 0;
}
-
+
fgetpos(logff[pos].fp, &fp_pos);
continue;
}
fgetpos(logff[pos].fp, &fp_pos);
continue;
}
- return(NULL);
+ return(NULL);
}
/* EOF */
}
/* EOF */