aboutsummaryrefslogtreecommitdiff
path: root/src/examples/post_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/post_example.c')
-rw-r--r--src/examples/post_example.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/examples/post_example.c b/src/examples/post_example.c
index 9f4fbcf9..d8f58d49 100644
--- a/src/examples/post_example.c
+++ b/src/examples/post_example.c
@@ -540,7 +540,7 @@ post_iterator (void *cls,
540 * @param upload_data_size set initially to the size of the 540 * @param upload_data_size set initially to the size of the
541 * upload_data provided; the method must update this 541 * upload_data provided; the method must update this
542 * value to the number of bytes NOT processed; 542 * value to the number of bytes NOT processed;
543 * @param ptr pointer that the callback can set to some 543 * @param req_cls pointer that the callback can set to some
544 * address and that will be preserved by MHD for future 544 * address and that will be preserved by MHD for future
545 * calls for this request; since the access handler may 545 * calls for this request; since the access handler may
546 * be called many times (i.e., for a PUT/POST operation 546 * be called many times (i.e., for a PUT/POST operation
@@ -549,7 +549,7 @@ post_iterator (void *cls,
549 * If necessary, this state can be cleaned up in the 549 * If necessary, this state can be cleaned up in the
550 * global "MHD_RequestCompleted" callback (which 550 * global "MHD_RequestCompleted" callback (which
551 * can be set with the MHD_OPTION_NOTIFY_COMPLETED). 551 * can be set with the MHD_OPTION_NOTIFY_COMPLETED).
552 * Initially, <tt>*con_cls</tt> will be NULL. 552 * Initially, <tt>*req_cls</tt> will be NULL.
553 * @return MHS_YES if the connection was handled successfully, 553 * @return MHS_YES if the connection was handled successfully,
554 * MHS_NO if the socket must be closed due to a serious 554 * MHS_NO if the socket must be closed due to a serious
555 * error while handling the request 555 * error while handling the request
@@ -562,7 +562,7 @@ create_response (void *cls,
562 const char *version, 562 const char *version,
563 const char *upload_data, 563 const char *upload_data,
564 size_t *upload_data_size, 564 size_t *upload_data_size,
565 void **ptr) 565 void **req_cls)
566{ 566{
567 struct MHD_Response *response; 567 struct MHD_Response *response;
568 struct Request *request; 568 struct Request *request;
@@ -572,7 +572,7 @@ create_response (void *cls,
572 (void) cls; /* Unused. Silent compiler warning. */ 572 (void) cls; /* Unused. Silent compiler warning. */
573 (void) version; /* Unused. Silent compiler warning. */ 573 (void) version; /* Unused. Silent compiler warning. */
574 574
575 request = *ptr; 575 request = *req_cls;
576 if (NULL == request) 576 if (NULL == request)
577 { 577 {
578 request = calloc (1, sizeof (struct Request)); 578 request = calloc (1, sizeof (struct Request));
@@ -581,7 +581,7 @@ create_response (void *cls,
581 fprintf (stderr, "calloc error: %s\n", strerror (errno)); 581 fprintf (stderr, "calloc error: %s\n", strerror (errno));
582 return MHD_NO; 582 return MHD_NO;
583 } 583 }
584 *ptr = request; 584 *req_cls = request;
585 if (0 == strcmp (method, MHD_HTTP_METHOD_POST)) 585 if (0 == strcmp (method, MHD_HTTP_METHOD_POST))
586 { 586 {
587 request->pp = MHD_create_post_processor (connection, 1024, 587 request->pp = MHD_create_post_processor (connection, 1024,
@@ -660,16 +660,16 @@ create_response (void *cls,
660 * 660 *
661 * @param cls not used 661 * @param cls not used
662 * @param connection connection that completed 662 * @param connection connection that completed
663 * @param con_cls session handle 663 * @param req_cls session handle
664 * @param toe status code 664 * @param toe status code
665 */ 665 */
666static void 666static void
667request_completed_callback (void *cls, 667request_completed_callback (void *cls,
668 struct MHD_Connection *connection, 668 struct MHD_Connection *connection,
669 void **con_cls, 669 void **req_cls,
670 enum MHD_RequestTerminationCode toe) 670 enum MHD_RequestTerminationCode toe)
671{ 671{
672 struct Request *request = *con_cls; 672 struct Request *request = *req_cls;
673 (void) cls; /* Unused. Silent compiler warning. */ 673 (void) cls; /* Unused. Silent compiler warning. */
674 (void) connection; /* Unused. Silent compiler warning. */ 674 (void) connection; /* Unused. Silent compiler warning. */
675 (void) toe; /* Unused. Silent compiler warning. */ 675 (void) toe; /* Unused. Silent compiler warning. */