chiark / gitweb /
journal: fix sd_journal_stream_fd()
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Jun 2012 22:19:13 +0000 (00:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 Jun 2012 22:19:13 +0000 (00:19 +0200)
src/journal/journal-send.c
src/journal/journald.c
src/readahead/readahead-analyze.c

index 7a948a7..bc44828 100644 (file)
@@ -375,10 +375,11 @@ _public_ int sd_journal_stream_fd(const char *identifier, int priority, int leve
                 identifier = "";
 
         l = strlen(identifier);
-        header = alloca(l + 1 + 2 + 2 + 2 + 2 + 2);
+        header = alloca(l + 1 + 1 + 2 + 2 + 2 + 2 + 2);
 
         memcpy(header, identifier, l);
         header[l++] = '\n';
+        header[l++] = '\n';
         header[l++] = '0' + priority;
         header[l++] = '\n';
         header[l++] = '0' + !!level_prefix;
index 619a98d..5c6c4ca 100644 (file)
@@ -460,7 +460,8 @@ static void dispatch_message_real(
                 struct iovec *iovec, unsigned n, unsigned m,
                 struct ucred *ucred,
                 struct timeval *tv,
-                const char *label, size_t label_len, const char *unit_id) {
+                const char *label, size_t label_len,
+                const char *unit_id) {
 
         char *pid = NULL, *uid = NULL, *gid = NULL,
                 *source_time = NULL, *boot_id = NULL, *machine_id = NULL,
index fb50ad3..8f1d7f9 100644 (file)
@@ -143,7 +143,6 @@ int main_analyze(const char *pack_path) {
 
         return EXIT_SUCCESS;
 
-
 fail:
         fclose(pack);
         return EXIT_FAILURE;