diff options
Diffstat (limited to 'src/examples/fileserver_example.c')
-rw-r--r-- | src/examples/fileserver_example.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/examples/fileserver_example.c b/src/examples/fileserver_example.c index 94c2ca95..76879eec 100644 --- a/src/examples/fileserver_example.c +++ b/src/examples/fileserver_example.c | |||
@@ -48,7 +48,7 @@ ahc_echo (void *cls, | |||
48 | const char *method, | 48 | const char *method, |
49 | const char *version, | 49 | const char *version, |
50 | const char *upload_data, | 50 | const char *upload_data, |
51 | size_t *upload_data_size, void **ptr) | 51 | size_t *upload_data_size, void **req_cls) |
52 | { | 52 | { |
53 | static int aptr; | 53 | static int aptr; |
54 | struct MHD_Response *response; | 54 | struct MHD_Response *response; |
@@ -63,13 +63,13 @@ ahc_echo (void *cls, | |||
63 | if ( (0 != strcmp (method, MHD_HTTP_METHOD_GET)) && | 63 | if ( (0 != strcmp (method, MHD_HTTP_METHOD_GET)) && |
64 | (0 != strcmp (method, MHD_HTTP_METHOD_HEAD)) ) | 64 | (0 != strcmp (method, MHD_HTTP_METHOD_HEAD)) ) |
65 | return MHD_NO; /* unexpected method */ | 65 | return MHD_NO; /* unexpected method */ |
66 | if (&aptr != *ptr) | 66 | if (&aptr != *req_cls) |
67 | { | 67 | { |
68 | /* do never respond on first call */ | 68 | /* do never respond on first call */ |
69 | *ptr = &aptr; | 69 | *req_cls = &aptr; |
70 | return MHD_YES; | 70 | return MHD_YES; |
71 | } | 71 | } |
72 | *ptr = NULL; /* reset when done */ | 72 | *req_cls = NULL; /* reset when done */ |
73 | /* WARNING: direct usage of url as filename is for example only! | 73 | /* WARNING: direct usage of url as filename is for example only! |
74 | * NEVER pass received data directly as parameter to file manipulation | 74 | * NEVER pass received data directly as parameter to file manipulation |
75 | * functions. Always check validity of data before using. | 75 | * functions. Always check validity of data before using. |