summaryrefslogtreecommitdiff
path: root/src/journal-remote/microhttpd-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal-remote/microhttpd-util.c')
-rw-r--r--src/journal-remote/microhttpd-util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c
index 2f16b02e9a..67d97e24ff 100644
--- a/src/journal-remote/microhttpd-util.c
+++ b/src/journal-remote/microhttpd-util.c
@@ -82,6 +82,7 @@ int mhd_respond_oom(struct MHD_Connection *connection) {
}
int mhd_respondf(struct MHD_Connection *connection,
+ int error,
enum MHD_RequestTerminationCode code,
const char *format, ...) {
@@ -92,6 +93,9 @@ int mhd_respondf(struct MHD_Connection *connection,
assert(connection);
assert(format);
+ if (error < 0)
+ error = -error;
+ errno = -error;
va_start(ap, format);
r = vasprintf(&m, format, ap);
va_end(ap);