aboutsummaryrefslogtreecommitdiff
path: root/src/backend/anastasis-httpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/anastasis-httpd.c')
-rw-r--r--src/backend/anastasis-httpd.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c
index ee7aea7..7c4b068 100644
--- a/src/backend/anastasis-httpd.c
+++ b/src/backend/anastasis-httpd.c
@@ -127,12 +127,12 @@ static struct MHD_Daemon *mhd;
127struct ANASTASIS_DatabasePlugin *db; 127struct ANASTASIS_DatabasePlugin *db;
128 128
129/** 129/**
130 * Reschedule context for #SH_ctx. 130 * Reschedule context for #AH_ctx.
131 */ 131 */
132static struct GNUNET_CURL_RescheduleContext *rc; 132static struct GNUNET_CURL_RescheduleContext *rc;
133 133
134/** 134/**
135 * Set if we should immediately #MHD_run again. 135 * Set if we should immediately MHD_run() again.
136 */ 136 */
137static int triggered; 137static int triggered;
138 138
@@ -232,24 +232,25 @@ AH_trigger_curl (void)
232 232
233/** 233/**
234 * A client has requested the given url using the given method 234 * A client has requested the given url using the given method
235 * (#MHD_HTTP_METHOD_GET, #MHD_HTTP_METHOD_PUT, 235 * (MHD_HTTP_METHOD_GET, MHD_HTTP_METHOD_PUT,
236 * #MHD_HTTP_METHOD_DELETE, #MHD_HTTP_METHOD_POST, etc). The callback 236 * MHD_HTTP_METHOD_DELETE, MHD_HTTP_METHOD_POST, etc). The callback
237 * must call MHD callbacks to provide content to give back to the 237 * must call MHD callbacks to provide content to give back to the
238 * client and return an HTTP status code (i.e. #MHD_HTTP_OK, 238 * client and return an HTTP status code (i.e. MHD_HTTP_OK,
239 * #MHD_HTTP_NOT_FOUND, etc.). 239 * MHD_HTTP_NOT_FOUND, etc.).
240 * 240 *
241 * @param cls argument given together with the function 241 * @param cls argument given together with the function
242 * pointer when the handler was registered with MHD 242 * pointer when the handler was registered with MHD
243 * @param connection MHD connection handle with further request details
243 * @param url the requested url 244 * @param url the requested url
244 * @param method the HTTP method used (#MHD_HTTP_METHOD_GET, 245 * @param method the HTTP method used (MHD_HTTP_METHOD_GET,
245 * #MHD_HTTP_METHOD_PUT, etc.) 246 * MHD_HTTP_METHOD_PUT, etc.)
246 * @param version the HTTP version string (i.e. 247 * @param version the HTTP version string (i.e.
247 * #MHD_HTTP_VERSION_1_1) 248 * MHD_HTTP_VERSION_1_1)
248 * @param upload_data the data being uploaded (excluding HEADERS, 249 * @param upload_data the data being uploaded (excluding HEADERS,
249 * for a POST that fits into memory and that is encoded 250 * for a POST that fits into memory and that is encoded
250 * with a supported encoding, the POST data will NOT be 251 * with a supported encoding, the POST data will NOT be
251 * given in upload_data and is instead available as 252 * given in upload_data and is instead available as
252 * part of #MHD_get_connection_values; very large POST 253 * part of MHD_get_connection_values(); very large POST
253 * data *will* be made available incrementally in 254 * data *will* be made available incrementally in
254 * @a upload_data) 255 * @a upload_data)
255 * @param upload_data_size set initially to the size of the 256 * @param upload_data_size set initially to the size of the
@@ -262,8 +263,8 @@ AH_trigger_curl (void)
262 * with plenty of upload data) this allows the application 263 * with plenty of upload data) this allows the application
263 * to easily associate some request-specific state. 264 * to easily associate some request-specific state.
264 * If necessary, this state can be cleaned up in the 265 * If necessary, this state can be cleaned up in the
265 * global #MHD_RequestCompletedCallback (which 266 * global MHD_RequestCompletedCallback (which
266 * can be set with the #MHD_OPTION_NOTIFY_COMPLETED). 267 * can be set with the MHD_OPTION_NOTIFY_COMPLETED).
267 * Initially, `*con_cls` will be NULL. 268 * Initially, `*con_cls` will be NULL.
268 * @return #MHD_YES if the connection was handled successfully, 269 * @return #MHD_YES if the connection was handled successfully,
269 * #MHD_NO if the socket must be closed due to a serious 270 * #MHD_NO if the socket must be closed due to a serious
@@ -537,7 +538,7 @@ handle_mhd_completion_callback (void *cls,
537 * Function that queries MHD's select sets and 538 * Function that queries MHD's select sets and
538 * starts the task waiting for them. 539 * starts the task waiting for them.
539 * 540 *
540 * @param daemon_handle HTTP server to prepare to run 541 * @return task handle for the daemon
541 */ 542 */
542static struct GNUNET_SCHEDULER_Task * 543static struct GNUNET_SCHEDULER_Task *
543prepare_daemon (void) 544prepare_daemon (void)