aboutsummaryrefslogtreecommitdiffstats
path: root/daemon/dest_file.c
diff options
context:
space:
mode:
authoryaworsky <yaworsky>2005-11-18 09:45:14 +0000
committeryaworsky <yaworsky>2005-11-18 09:45:14 +0000
commita71d55cedfa6b226582195add906116a4d5648f7 (patch)
tree51c11bf99864fa3882a03c44cf579ed5183a9f8e /daemon/dest_file.c
parent049555ae5eb7c778e80f7b090530f2580aa84f3d (diff)
downloadsyslog-win32-a71d55cedfa6b226582195add906116a4d5648f7.tar.gz
syslog-win32-a71d55cedfa6b226582195add906116a4d5648f7.tar.xz
syslog-win32-a71d55cedfa6b226582195add906116a4d5648f7.zip
Use the right comparsion function and rename string_compare to string_equal
Diffstat (limited to '')
-rw-r--r--daemon/dest_file.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/daemon/dest_file.c b/daemon/dest_file.c
index 7ede68c..c4d3cfe 100644
--- a/daemon/dest_file.c
+++ b/daemon/dest_file.c
@@ -67,19 +67,19 @@ static gboolean compare_current_and_first_messages( struct file_writer* writer )
{
TRACE_ENTER( "%p\n", writer );
- if( string_compare( writer->current_msg->hostname,
- writer->first_msg->hostname )
- || string_compare( writer->current_msg->message,
- writer->first_msg->message ) )
+ if( string_equal( writer->current_msg->hostname,
+ writer->first_msg->hostname )
+ && string_equal( writer->current_msg->message,
+ writer->first_msg->message ) )
{
- release_message( writer->first_msg );
- writer->first_msg = NULL;
- TRACE_LEAVE( "%p done; messages aren't identical\n", writer );
- return FALSE;
+ TRACE_LEAVE( "%p ok\n" );
+ return TRUE;
}
- TRACE_LEAVE( "%p ok\n" );
- return TRUE;
+ release_message( writer->first_msg );
+ writer->first_msg = NULL;
+ TRACE_LEAVE( "%p done; messages aren't identical\n", writer );
+ return FALSE;
}
/******************************************************************************