aboutsummaryrefslogtreecommitdiff
path: root/doc/examples/sessions.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/sessions.c')
-rw-r--r--doc/examples/sessions.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/examples/sessions.c b/doc/examples/sessions.c
index 5b4d4b45..fc4a498c 100644
--- a/doc/examples/sessions.c
+++ b/doc/examples/sessions.c
@@ -339,12 +339,12 @@ fill_v1_form (const void *cls,
339 struct MHD_Connection *connection) 339 struct MHD_Connection *connection)
340{ 340{
341 enum MHD_Result ret; 341 enum MHD_Result ret;
342 const char *form = cls;
343 char *reply; 342 char *reply;
344 struct MHD_Response *response; 343 struct MHD_Response *response;
344 (void) cls; /* Unused */
345 345
346 if (-1 == asprintf (&reply, 346 if (-1 == asprintf (&reply,
347 form, 347 MAIN_PAGE,
348 session->value_1)) 348 session->value_1))
349 { 349 {
350 /* oops */ 350 /* oops */
@@ -381,12 +381,12 @@ fill_v1_v2_form (const void *cls,
381 struct MHD_Connection *connection) 381 struct MHD_Connection *connection)
382{ 382{
383 enum MHD_Result ret; 383 enum MHD_Result ret;
384 const char *form = cls;
385 char *reply; 384 char *reply;
386 struct MHD_Response *response; 385 struct MHD_Response *response;
386 (void) cls; /* Unused */
387 387
388 if (-1 == asprintf (&reply, 388 if (-1 == asprintf (&reply,
389 form, 389 SECOND_PAGE,
390 session->value_1, 390 session->value_1,
391 session->value_2)) 391 session->value_2))
392 { 392 {
@@ -446,8 +446,8 @@ not_found_page (const void *cls,
446 * List of all pages served by this HTTP server. 446 * List of all pages served by this HTTP server.
447 */ 447 */
448static struct Page pages[] = { 448static struct Page pages[] = {
449 { "/", "text/html", &fill_v1_form, MAIN_PAGE }, 449 { "/", "text/html", &fill_v1_form, NULL },
450 { "/2", "text/html", &fill_v1_v2_form, SECOND_PAGE }, 450 { "/2", "text/html", &fill_v1_v2_form, NULL },
451 { "/S", "text/html", &serve_simple_form, SUBMIT_PAGE }, 451 { "/S", "text/html", &serve_simple_form, SUBMIT_PAGE },
452 { "/F", "text/html", &serve_simple_form, LAST_PAGE }, 452 { "/F", "text/html", &serve_simple_form, LAST_PAGE },
453 { NULL, NULL, &not_found_page, NULL } /* 404 */ 453 { NULL, NULL, &not_found_page, NULL } /* 404 */