Fix missing newline (#156).
authorJelmer Vernooij <jelmer@samba.org>
Thu, 18 Oct 2007 15:40:33 +0000 (17:40 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 18 Oct 2007 15:40:33 +0000 (17:40 +0200)
mods/log_custom.c

index 1c0d8f028ec533c1857541e4192ebd22dccb9e82..e0958660edb0ba5fa9c6e1d8966211cc0e8f8a5e 100644 (file)
@@ -355,6 +355,7 @@ static void file_write_line(struct log_custom_data *data,
 {
        char *s;
        char *n = NULL;
+       char *line;
 
        custom_subst(network, &s, fmt, l, identifier, FALSE, FALSE);
 
@@ -363,10 +364,14 @@ static void file_write_line(struct log_custom_data *data,
 
        custom_subst(network, &n, data->logfilename, l, identifier, TRUE, TRUE);
 
-       log_support_write(data->log_ctx, n, s);
+       line = g_strdup_printf("%s\n", n);
+       g_free(n);
+
+       log_support_write(data->log_ctx, line, s);
+
+       g_free(line);
 
        g_free(s);
-       g_free(n);
 }
 
 static void file_write_line_target(struct log_custom_data *data,