chiark / gitweb /
journal: add ability to filter by current user
[elogind.git] / src / journal / journal-gatewayd.c
index a633638f8030d4aa8cbeec451302f96cca36decf..86338c66f33e1493062f82aefb3c2981d4b5391d 100644 (file)
@@ -109,7 +109,7 @@ static int open_journal(RequestMeta *m) {
         if (m->journal)
                 return 0;
 
-        return sd_journal_open(&m->journal, SD_JOURNAL_LOCAL_ONLY|SD_JOURNAL_SYSTEM_ONLY);
+        return sd_journal_open(&m->journal, SD_JOURNAL_LOCAL_ONLY|SD_JOURNAL_SYSTEM);
 }
 
 static int respond_oom_internal(struct MHD_Connection *connection) {
@@ -335,7 +335,7 @@ static int request_parse_range(
 
                 colon2 = strchr(colon + 1, ':');
                 if (colon2) {
-                        char _cleanup_free_ *t;
+                        _cleanup_free_ char *t;
 
                         t = strndup(colon + 1, colon2 - colon - 1);
                         if (!t)
@@ -839,7 +839,7 @@ static int request_handler_machine(
                      "\"cutoff_to_realtime\" : \"%llu\" }\n",
                      SD_ID128_FORMAT_VAL(mid),
                      SD_ID128_FORMAT_VAL(bid),
-                     hostname_cleanup(hostname),
+                     hostname_cleanup(hostname, false),
                      os_name ? os_name : "Linux",
                      v ? v : "bare",
                      (unsigned long long) usage,