diff options
Diffstat (limited to 'src/examples/refuse_post_example.c')
-rw-r--r-- | src/examples/refuse_post_example.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/examples/refuse_post_example.c b/src/examples/refuse_post_example.c index 7e100d9f..dc261575 100644 --- a/src/examples/refuse_post_example.c +++ b/src/examples/refuse_post_example.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; |
@@ -56,9 +56,9 @@ ahc_echo (void *cls, | |||
56 | if ((0 != strcmp (method, "GET")) && (0 != strcmp (method, "POST"))) | 56 | if ((0 != strcmp (method, "GET")) && (0 != strcmp (method, "POST"))) |
57 | return MHD_NO; /* unexpected method */ | 57 | return MHD_NO; /* unexpected method */ |
58 | 58 | ||
59 | if (&aptr != *ptr) | 59 | if (&aptr != *req_cls) |
60 | { | 60 | { |
61 | *ptr = &aptr; | 61 | *req_cls = &aptr; |
62 | 62 | ||
63 | /* always to busy for POST requests */ | 63 | /* always to busy for POST requests */ |
64 | if (0 == strcmp (method, "POST")) | 64 | if (0 == strcmp (method, "POST")) |
@@ -74,7 +74,7 @@ ahc_echo (void *cls, | |||
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | *ptr = NULL; /* reset when done */ | 77 | *req_cls = NULL; /* reset when done */ |
78 | response = MHD_create_response_from_buffer (strlen (me), | 78 | response = MHD_create_response_from_buffer (strlen (me), |
79 | (void *) me, | 79 | (void *) me, |
80 | MHD_RESPMEM_PERSISTENT); | 80 | MHD_RESPMEM_PERSISTENT); |