aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_postform.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_postform.c')
-rw-r--r--src/testcurl/test_postform.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c
index 1f60fb06..87febcbc 100644
--- a/src/testcurl/test_postform.c
+++ b/src/testcurl/test_postform.c
@@ -65,15 +65,15 @@ struct CBC
65static void 65static void
66completed_cb (void *cls, 66completed_cb (void *cls,
67 struct MHD_Connection *connection, 67 struct MHD_Connection *connection,
68 void **con_cls, 68 void **req_cls,
69 enum MHD_RequestTerminationCode toe) 69 enum MHD_RequestTerminationCode toe)
70{ 70{
71 struct MHD_PostProcessor *pp = *con_cls; 71 struct MHD_PostProcessor *pp = *req_cls;
72 (void) cls; (void) connection; (void) toe; /* Unused. Silent compiler warning. */ 72 (void) cls; (void) connection; (void) toe; /* Unused. Silent compiler warning. */
73 73
74 if (NULL != pp) 74 if (NULL != pp)
75 MHD_destroy_post_processor (pp); 75 MHD_destroy_post_processor (pp);
76 *con_cls = NULL; 76 *req_cls = NULL;
77} 77}
78 78
79 79
@@ -128,7 +128,7 @@ ahc_echo (void *cls,
128 const char *method, 128 const char *method,
129 const char *version, 129 const char *version,
130 const char *upload_data, size_t *upload_data_size, 130 const char *upload_data, size_t *upload_data_size,
131 void **unused) 131 void **req_cls)
132{ 132{
133 static int eok; 133 static int eok;
134 struct MHD_Response *response; 134 struct MHD_Response *response;
@@ -141,14 +141,14 @@ ahc_echo (void *cls,
141 printf ("METHOD: %s\n", method); 141 printf ("METHOD: %s\n", method);
142 return MHD_NO; /* unexpected method */ 142 return MHD_NO; /* unexpected method */
143 } 143 }
144 pp = *unused; 144 pp = *req_cls;
145 if (pp == NULL) 145 if (pp == NULL)
146 { 146 {
147 eok = 0; 147 eok = 0;
148 pp = MHD_create_post_processor (connection, 1024, &post_iterator, &eok); 148 pp = MHD_create_post_processor (connection, 1024, &post_iterator, &eok);
149 if (pp == NULL) 149 if (pp == NULL)
150 abort (); 150 abort ();
151 *unused = pp; 151 *req_cls = pp;
152 } 152 }
153 MHD_post_process (pp, upload_data, *upload_data_size); 153 MHD_post_process (pp, upload_data, *upload_data_size);
154 if ((eok == 3) && (0 == *upload_data_size)) 154 if ((eok == 3) && (0 == *upload_data_size))
@@ -159,7 +159,7 @@ ahc_echo (void *cls,
159 ret = MHD_queue_response (connection, MHD_HTTP_OK, response); 159 ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
160 MHD_destroy_response (response); 160 MHD_destroy_response (response);
161 MHD_destroy_post_processor (pp); 161 MHD_destroy_post_processor (pp);
162 *unused = NULL; 162 *req_cls = NULL;
163 return ret; 163 return ret;
164 } 164 }
165 *upload_data_size = 0; 165 *upload_data_size = 0;