aboutsummaryrefslogtreecommitdiff
path: root/src/examples/fileserver_example_external_select.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/fileserver_example_external_select.c')
-rw-r--r--src/examples/fileserver_example_external_select.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/examples/fileserver_example_external_select.c b/src/examples/fileserver_example_external_select.c
index 7209751f..09f7be0a 100644
--- a/src/examples/fileserver_example_external_select.c
+++ b/src/examples/fileserver_example_external_select.c
@@ -55,7 +55,7 @@ ahc_echo (void *cls,
55 const char *method, 55 const char *method,
56 const char *version, 56 const char *version,
57 const char *upload_data, 57 const char *upload_data,
58 size_t *upload_data_size, void **ptr) 58 size_t *upload_data_size, void **req_cls)
59{ 59{
60 static int aptr; 60 static int aptr;
61 struct MHD_Response *response; 61 struct MHD_Response *response;
@@ -70,13 +70,13 @@ ahc_echo (void *cls,
70 70
71 if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) 71 if (0 != strcmp (method, MHD_HTTP_METHOD_GET))
72 return MHD_NO; /* unexpected method */ 72 return MHD_NO; /* unexpected method */
73 if (&aptr != *ptr) 73 if (&aptr != *req_cls)
74 { 74 {
75 /* do never respond on first call */ 75 /* do never respond on first call */
76 *ptr = &aptr; 76 *req_cls = &aptr;
77 return MHD_YES; 77 return MHD_YES;
78 } 78 }
79 *ptr = NULL; /* reset when done */ 79 *req_cls = NULL; /* reset when done */
80 80
81 file = fopen (&url[1], "rb"); 81 file = fopen (&url[1], "rb");
82 if (NULL != file) 82 if (NULL != file)