aboutsummaryrefslogtreecommitdiff
path: root/src/examples/fileserver_example_dirs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/fileserver_example_dirs.c')
-rw-r--r--src/examples/fileserver_example_dirs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/examples/fileserver_example_dirs.c b/src/examples/fileserver_example_dirs.c
index e6c9ed1f..796cb42e 100644
--- a/src/examples/fileserver_example_dirs.c
+++ b/src/examples/fileserver_example_dirs.c
@@ -88,7 +88,7 @@ ahc_echo (void *cls,
88 const char *method, 88 const char *method,
89 const char *version, 89 const char *version,
90 const char *upload_data, 90 const char *upload_data,
91 size_t *upload_data_size, void **ptr) 91 size_t *upload_data_size, void **req_cls)
92{ 92{
93 static int aptr; 93 static int aptr;
94 struct MHD_Response *response; 94 struct MHD_Response *response;
@@ -105,13 +105,13 @@ ahc_echo (void *cls,
105 105
106 if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) 106 if (0 != strcmp (method, MHD_HTTP_METHOD_GET))
107 return MHD_NO; /* unexpected method */ 107 return MHD_NO; /* unexpected method */
108 if (&aptr != *ptr) 108 if (&aptr != *req_cls)
109 { 109 {
110 /* do never respond on first call */ 110 /* do never respond on first call */
111 *ptr = &aptr; 111 *req_cls = &aptr;
112 return MHD_YES; 112 return MHD_YES;
113 } 113 }
114 *ptr = NULL; /* reset when done */ 114 *req_cls = NULL; /* reset when done */
115 115
116 file = fopen (&url[1], "rb"); 116 file = fopen (&url[1], "rb");
117 if (NULL != file) 117 if (NULL != file)