chiark / gitweb /
journal-gatewayd: always log oom() in addition to returning error
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 28 Nov 2012 17:00:09 +0000 (18:00 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 18 Jan 2013 06:15:54 +0000 (01:15 -0500)
src/journal/journal-gatewayd.c

index bb9bd44c7a49e1fef8e12b0c1fca9ac195aaa297..613b5394a869e937e2cac0144ca1286d866691eb 100644 (file)
@@ -110,7 +110,7 @@ static int open_journal(RequestMeta *m) {
 }
 
 
 }
 
 
-static int respond_oom(struct MHD_Connection *connection) {
+static int respond_oom_internal(struct MHD_Connection *connection) {
         struct MHD_Response *response;
         const char m[] = "Out of memory.\n";
         int ret;
         struct MHD_Response *response;
         const char m[] = "Out of memory.\n";
         int ret;
@@ -128,6 +128,8 @@ static int respond_oom(struct MHD_Connection *connection) {
         return ret;
 }
 
         return ret;
 }
 
+#define respond_oom(connection) log_oom(), respond_oom_internal(connection)
+
 static int respond_error(
                 struct MHD_Connection *connection,
                 unsigned code,
 static int respond_error(
                 struct MHD_Connection *connection,
                 unsigned code,