aboutsummaryrefslogtreecommitdiff
path: root/src/examples/connection_close.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/connection_close.c')
-rw-r--r--src/examples/connection_close.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/examples/connection_close.c b/src/examples/connection_close.c
index 5629a687..e5f787a3 100644
--- a/src/examples/connection_close.c
+++ b/src/examples/connection_close.c
@@ -41,7 +41,7 @@ ahc_echo (void *cls,
41 const char *url, 41 const char *url,
42 const char *method, 42 const char *method,
43 const char *version, 43 const char *version,
44 const char *upload_data, size_t *upload_data_size, void **ptr) 44 const char *upload_data, size_t *upload_data_size, void **req_cls)
45{ 45{
46 static int aptr; 46 static int aptr;
47 const char *me = cls; 47 const char *me = cls;
@@ -54,13 +54,13 @@ ahc_echo (void *cls,
54 54
55 if (0 != strcmp (method, "GET")) 55 if (0 != strcmp (method, "GET"))
56 return MHD_NO; /* unexpected method */ 56 return MHD_NO; /* unexpected method */
57 if (&aptr != *ptr) 57 if (&aptr != *req_cls)
58 { 58 {
59 /* do never respond on first call */ 59 /* do never respond on first call */
60 *ptr = &aptr; 60 *req_cls = &aptr;
61 return MHD_YES; 61 return MHD_YES;
62 } 62 }
63 *ptr = NULL; /* reset when done */ 63 *req_cls = NULL; /* reset when done */
64 response = MHD_create_response_from_buffer (strlen (me), 64 response = MHD_create_response_from_buffer (strlen (me),
65 (void *) me, 65 (void *) me,
66 MHD_RESPMEM_PERSISTENT); 66 MHD_RESPMEM_PERSISTENT);
@@ -75,7 +75,7 @@ ahc_echo (void *cls,
75static void 75static void
76request_completed (void *cls, 76request_completed (void *cls,
77 struct MHD_Connection *connection, 77 struct MHD_Connection *connection,
78 void **con_cls, 78 void **req_cls,
79 enum MHD_RequestTerminationCode toe) 79 enum MHD_RequestTerminationCode toe)
80{ 80{
81 fprintf (stderr, 81 fprintf (stderr,