aboutsummaryrefslogtreecommitdiff
path: root/doc/examples/simplepost.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/simplepost.c')
-rw-r--r--doc/examples/simplepost.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/examples/simplepost.c b/doc/examples/simplepost.c
index 1e52e5dd..ea3899d1 100644
--- a/doc/examples/simplepost.c
+++ b/doc/examples/simplepost.c
@@ -105,9 +105,9 @@ iterate_post (void *coninfo_cls, enum MHD_ValueKind kind, const char *key,
105 105
106static void 106static void
107request_completed (void *cls, struct MHD_Connection *connection, 107request_completed (void *cls, struct MHD_Connection *connection,
108 void **con_cls, enum MHD_RequestTerminationCode toe) 108 void **req_cls, enum MHD_RequestTerminationCode toe)
109{ 109{
110 struct connection_info_struct *con_info = *con_cls; 110 struct connection_info_struct *con_info = *req_cls;
111 (void) cls; /* Unused. Silent compiler warning. */ 111 (void) cls; /* Unused. Silent compiler warning. */
112 (void) connection; /* Unused. Silent compiler warning. */ 112 (void) connection; /* Unused. Silent compiler warning. */
113 (void) toe; /* Unused. Silent compiler warning. */ 113 (void) toe; /* Unused. Silent compiler warning. */
@@ -123,7 +123,7 @@ request_completed (void *cls, struct MHD_Connection *connection,
123 } 123 }
124 124
125 free (con_info); 125 free (con_info);
126 *con_cls = NULL; 126 *req_cls = NULL;
127} 127}
128 128
129 129
@@ -131,13 +131,13 @@ static enum MHD_Result
131answer_to_connection (void *cls, struct MHD_Connection *connection, 131answer_to_connection (void *cls, struct MHD_Connection *connection,
132 const char *url, const char *method, 132 const char *url, const char *method,
133 const char *version, const char *upload_data, 133 const char *version, const char *upload_data,
134 size_t *upload_data_size, void **con_cls) 134 size_t *upload_data_size, void **req_cls)
135{ 135{
136 (void) cls; /* Unused. Silent compiler warning. */ 136 (void) cls; /* Unused. Silent compiler warning. */
137 (void) url; /* Unused. Silent compiler warning. */ 137 (void) url; /* Unused. Silent compiler warning. */
138 (void) version; /* Unused. Silent compiler warning. */ 138 (void) version; /* Unused. Silent compiler warning. */
139 139
140 if (NULL == *con_cls) 140 if (NULL == *req_cls)
141 { 141 {
142 struct connection_info_struct *con_info; 142 struct connection_info_struct *con_info;
143 143
@@ -163,7 +163,7 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
163 else 163 else
164 con_info->connectiontype = GET; 164 con_info->connectiontype = GET;
165 165
166 *con_cls = (void *) con_info; 166 *req_cls = (void *) con_info;
167 167
168 return MHD_YES; 168 return MHD_YES;
169 } 169 }
@@ -175,7 +175,7 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
175 175
176 if (0 == strcmp (method, "POST")) 176 if (0 == strcmp (method, "POST"))
177 { 177 {
178 struct connection_info_struct *con_info = *con_cls; 178 struct connection_info_struct *con_info = *req_cls;
179 179
180 if (*upload_data_size != 0) 180 if (*upload_data_size != 0)
181 { 181 {