diff options
Diffstat (limited to 'doc/examples/sessions.c')
-rw-r--r-- | doc/examples/sessions.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/examples/sessions.c b/doc/examples/sessions.c index db311bd4..5dd74e2c 100644 --- a/doc/examples/sessions.c +++ b/doc/examples/sessions.c | |||
@@ -548,7 +548,7 @@ post_iterator (void *cls, | |||
548 | * @param upload_data_size set initially to the size of the | 548 | * @param upload_data_size set initially to the size of the |
549 | * upload_data provided; the method must update this | 549 | * upload_data provided; the method must update this |
550 | * value to the number of bytes NOT processed; | 550 | * value to the number of bytes NOT processed; |
551 | * @param ptr pointer that the callback can set to some | 551 | * @param req_cls pointer that the callback can set to some |
552 | * address and that will be preserved by MHD for future | 552 | * address and that will be preserved by MHD for future |
553 | * calls for this request; since the access handler may | 553 | * calls for this request; since the access handler may |
554 | * be called many times (i.e., for a PUT/POST operation | 554 | * be called many times (i.e., for a PUT/POST operation |
@@ -557,7 +557,7 @@ post_iterator (void *cls, | |||
557 | * If necessary, this state can be cleaned up in the | 557 | * If necessary, this state can be cleaned up in the |
558 | * global "MHD_RequestCompleted" callback (which | 558 | * global "MHD_RequestCompleted" callback (which |
559 | * can be set with the MHD_OPTION_NOTIFY_COMPLETED). | 559 | * can be set with the MHD_OPTION_NOTIFY_COMPLETED). |
560 | * Initially, <tt>*con_cls</tt> will be NULL. | 560 | * Initially, <tt>*req_cls</tt> will be NULL. |
561 | * @return MHS_YES if the connection was handled successfully, | 561 | * @return MHS_YES if the connection was handled successfully, |
562 | * MHS_NO if the socket must be closed due to a serious | 562 | * MHS_NO if the socket must be closed due to a serious |
563 | * error while handling the request | 563 | * error while handling the request |
@@ -570,7 +570,7 @@ create_response (void *cls, | |||
570 | const char *version, | 570 | const char *version, |
571 | const char *upload_data, | 571 | const char *upload_data, |
572 | size_t *upload_data_size, | 572 | size_t *upload_data_size, |
573 | void **ptr) | 573 | void **req_cls) |
574 | { | 574 | { |
575 | struct MHD_Response *response; | 575 | struct MHD_Response *response; |
576 | struct Request *request; | 576 | struct Request *request; |
@@ -580,7 +580,7 @@ create_response (void *cls, | |||
580 | (void) cls; /* Unused. Silent compiler warning. */ | 580 | (void) cls; /* Unused. Silent compiler warning. */ |
581 | (void) version; /* Unused. Silent compiler warning. */ | 581 | (void) version; /* Unused. Silent compiler warning. */ |
582 | 582 | ||
583 | request = *ptr; | 583 | request = *req_cls; |
584 | if (NULL == request) | 584 | if (NULL == request) |
585 | { | 585 | { |
586 | request = calloc (1, sizeof (struct Request)); | 586 | request = calloc (1, sizeof (struct Request)); |
@@ -589,7 +589,7 @@ create_response (void *cls, | |||
589 | fprintf (stderr, "calloc error: %s\n", strerror (errno)); | 589 | fprintf (stderr, "calloc error: %s\n", strerror (errno)); |
590 | return MHD_NO; | 590 | return MHD_NO; |
591 | } | 591 | } |
592 | *ptr = request; | 592 | *req_cls = request; |
593 | if (0 == strcmp (method, MHD_HTTP_METHOD_POST)) | 593 | if (0 == strcmp (method, MHD_HTTP_METHOD_POST)) |
594 | { | 594 | { |
595 | request->pp = MHD_create_post_processor (connection, 1024, | 595 | request->pp = MHD_create_post_processor (connection, 1024, |
@@ -668,16 +668,16 @@ create_response (void *cls, | |||
668 | * | 668 | * |
669 | * @param cls not used | 669 | * @param cls not used |
670 | * @param connection connection that completed | 670 | * @param connection connection that completed |
671 | * @param con_cls session handle | 671 | * @param req_cls session handle |
672 | * @param toe status code | 672 | * @param toe status code |
673 | */ | 673 | */ |
674 | static void | 674 | static void |
675 | request_completed_callback (void *cls, | 675 | request_completed_callback (void *cls, |
676 | struct MHD_Connection *connection, | 676 | struct MHD_Connection *connection, |
677 | void **con_cls, | 677 | void **req_cls, |
678 | enum MHD_RequestTerminationCode toe) | 678 | enum MHD_RequestTerminationCode toe) |
679 | { | 679 | { |
680 | struct Request *request = *con_cls; | 680 | struct Request *request = *req_cls; |
681 | (void) cls; /* Unused. Silent compiler warning. */ | 681 | (void) cls; /* Unused. Silent compiler warning. */ |
682 | (void) connection; /* Unused. Silent compiler warning. */ | 682 | (void) connection; /* Unused. Silent compiler warning. */ |
683 | (void) toe; /* Unused. Silent compiler warning. */ | 683 | (void) toe; /* Unused. Silent compiler warning. */ |