aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_post.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_post.c')
-rw-r--r--src/testcurl/test_post.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c
index 1bf9be70..90b8f48a 100644
--- a/src/testcurl/test_post.c
+++ b/src/testcurl/test_post.c
@@ -69,15 +69,15 @@ struct CBC
69static void 69static void
70completed_cb (void *cls, 70completed_cb (void *cls,
71 struct MHD_Connection *connection, 71 struct MHD_Connection *connection,
72 void **con_cls, 72 void **req_cls,
73 enum MHD_RequestTerminationCode toe) 73 enum MHD_RequestTerminationCode toe)
74{ 74{
75 struct MHD_PostProcessor *pp = *con_cls; 75 struct MHD_PostProcessor *pp = *req_cls;
76 (void) cls; (void) connection; (void) toe; /* Unused. Silent compiler warning. */ 76 (void) cls; (void) connection; (void) toe; /* Unused. Silent compiler warning. */
77 77
78 if (NULL != pp) 78 if (NULL != pp)
79 MHD_destroy_post_processor (pp); 79 MHD_destroy_post_processor (pp);
80 *con_cls = NULL; 80 *req_cls = NULL;
81} 81}
82 82
83 83
@@ -129,7 +129,7 @@ ahc_echo (void *cls,
129 const char *method, 129 const char *method,
130 const char *version, 130 const char *version,
131 const char *upload_data, size_t *upload_data_size, 131 const char *upload_data, size_t *upload_data_size,
132 void **unused) 132 void **req_cls)
133{ 133{
134 static int eok; 134 static int eok;
135 struct MHD_Response *response; 135 struct MHD_Response *response;
@@ -142,12 +142,12 @@ ahc_echo (void *cls,
142 printf ("METHOD: %s\n", method); 142 printf ("METHOD: %s\n", method);
143 return MHD_NO; /* unexpected method */ 143 return MHD_NO; /* unexpected method */
144 } 144 }
145 pp = *unused; 145 pp = *req_cls;
146 if (pp == NULL) 146 if (pp == NULL)
147 { 147 {
148 eok = 0; 148 eok = 0;
149 pp = MHD_create_post_processor (connection, 1024, &post_iterator, &eok); 149 pp = MHD_create_post_processor (connection, 1024, &post_iterator, &eok);
150 *unused = pp; 150 *req_cls = pp;
151 } 151 }
152 MHD_post_process (pp, upload_data, *upload_data_size); 152 MHD_post_process (pp, upload_data, *upload_data_size);
153 if ((eok == 3) && (0 == *upload_data_size)) 153 if ((eok == 3) && (0 == *upload_data_size))
@@ -158,7 +158,7 @@ ahc_echo (void *cls,
158 ret = MHD_queue_response (connection, MHD_HTTP_OK, response); 158 ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
159 MHD_destroy_response (response); 159 MHD_destroy_response (response);
160 MHD_destroy_post_processor (pp); 160 MHD_destroy_post_processor (pp);
161 *unused = NULL; 161 *req_cls = NULL;
162 return ret; 162 return ret;
163 } 163 }
164 *upload_data_size = 0; 164 *upload_data_size = 0;
@@ -592,7 +592,7 @@ ahc_cancel (void *cls,
592 const char *method, 592 const char *method,
593 const char *version, 593 const char *version,
594 const char *upload_data, size_t *upload_data_size, 594 const char *upload_data, size_t *upload_data_size,
595 void **unused) 595 void **req_cls)
596{ 596{
597 struct MHD_Response *response; 597 struct MHD_Response *response;
598 enum MHD_Result ret; 598 enum MHD_Result ret;
@@ -606,9 +606,9 @@ ahc_cancel (void *cls,
606 return MHD_NO; 606 return MHD_NO;
607 } 607 }
608 608
609 if (*unused == NULL) 609 if (*req_cls == NULL)
610 { 610 {
611 *unused = "wibble"; 611 *req_cls = "wibble";
612 /* We don't want the body. Send a 500. */ 612 /* We don't want the body. Send a 500. */
613 response = MHD_create_response_from_buffer (0, NULL, 613 response = MHD_create_response_from_buffer (0, NULL,
614 MHD_RESPMEM_PERSISTENT); 614 MHD_RESPMEM_PERSISTENT);