diff options
Diffstat (limited to 'daemon/dest_relay.c')
-rwxr-xr-x | daemon/dest_relay.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/daemon/dest_relay.c b/daemon/dest_relay.c index 4bea0c6..0ddf675 100755 --- a/daemon/dest_relay.c +++ b/daemon/dest_relay.c @@ -92,20 +92,20 @@ done: static void put_message_to_relay_dest( struct destination* destination, struct message* msg ) { struct dest_extra *extra = destination->extra; - char pri[16]; + struct string *pri; gchar *buffer; int len; TRACE_ENTER( "msg=%p, destination=%s\n", msg, destination->name ); - sprintf( pri, "<%d>", LOG_MAKEPRI( msg->facility, msg->priority ) ); + pri = string_printf( "<%d>", LOG_MAKEPRI( msg->facility, msg->priority ) ); if( destination->u.relay.omit_hostname ) - buffer = g_strconcat( pri, msg->timestamp, " ", msg->message, "\n", NULL ); + len = string_concat( &buffer, pri, msg->timestamp, space, msg->message, line_feed, NULL ); else - buffer = g_strconcat( pri, msg->timestamp, " ", - msg->hostname, " ", msg->message, "\n", NULL ); + len = string_concat( &buffer, pri, msg->timestamp, space, + msg->hostname, space, msg->message, line_feed, NULL ); + string_release( pri ); - len = strlen( buffer ); if( len > 1024 ) { buffer[ 1023 ] = '\n'; |