X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fmicrohttpd-util.h;h=df4d003eb95eaf943c34d54c741a2d48118fa872;hb=5ea846cc5197682d07ee46398996a8c3ccfbcc38;hp=4afe0a29d1f95f2df1cb72f611176eb12a2be354;hpb=cafc7f91306ea17ace4a6c3d76d81c8780c87452;p=elogind.git diff --git a/src/journal/microhttpd-util.h b/src/journal/microhttpd-util.h index 4afe0a29d..df4d003eb 100644 --- a/src/journal/microhttpd-util.h +++ b/src/journal/microhttpd-util.h @@ -22,14 +22,28 @@ #pragma once #include +#include #include "macro.h" void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_(2, 0); -#ifdef HAVE_GNUTLS -#include +/* respond_oom() must be usable with return, hence this form. */ +#define respond_oom(connection) log_oom(), mhd_respond_oom(connection) + +int mhd_respondf(struct MHD_Connection *connection, + unsigned code, + const char *format, ...) _printf_(3,4); + +int mhd_respond(struct MHD_Connection *connection, + unsigned code, + const char *message); +int mhd_respond_oom(struct MHD_Connection *connection); + +int check_permissions(struct MHD_Connection *connection, int *code); + +#ifdef HAVE_GNUTLS void log_func_gnutls(int level, const char *message); /* This is additionally filtered by our internal log level, so it