diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-01-18 15:17:21 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-01-18 15:18:40 +0300 |
commit | bd41946e8f4f2086f7b2fcacc468a668c0676aff (patch) | |
tree | 151e103d07dc210f8365bbef0c26361d29873850 /src/examples/websocket_threaded_example.c | |
parent | 17c22c2c3b8e2b56874ff701be58e7c10d1d41f4 (diff) | |
download | libmicrohttpd-bd41946e8f4f2086f7b2fcacc468a668c0676aff.tar.gz libmicrohttpd-bd41946e8f4f2086f7b2fcacc468a668c0676aff.zip |
Renamed 'con_cls' -> 'req_cls' for access handler callback
The argument is actually request-specific, not connection specific. The
name was confusing.
Fixed related documentation and clarified usage.
Also fixed code where argument named 'unused' was actually used.
Diffstat (limited to 'src/examples/websocket_threaded_example.c')
-rw-r--r-- | src/examples/websocket_threaded_example.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c index b3c7f111..04b972d4 100644 --- a/src/examples/websocket_threaded_example.c +++ b/src/examples/websocket_threaded_example.c | |||
@@ -763,7 +763,7 @@ run_usock (void *cls) | |||
763 | 763 | ||
764 | 764 | ||
765 | static void | 765 | static void |
766 | uh_cb (void *cls, struct MHD_Connection *con, void *con_cls, | 766 | uh_cb (void *cls, struct MHD_Connection *con, void *req_cls, |
767 | const char *extra_in, size_t extra_in_size, MHD_socket sock, | 767 | const char *extra_in, size_t extra_in_size, MHD_socket sock, |
768 | struct MHD_UpgradeResponseHandle *urh) | 768 | struct MHD_UpgradeResponseHandle *urh) |
769 | { | 769 | { |
@@ -774,7 +774,7 @@ uh_cb (void *cls, struct MHD_Connection *con, void *con_cls, | |||
774 | 774 | ||
775 | (void) cls; /* Unused. Silent compiler warning. */ | 775 | (void) cls; /* Unused. Silent compiler warning. */ |
776 | (void) con; /* Unused. Silent compiler warning. */ | 776 | (void) con; /* Unused. Silent compiler warning. */ |
777 | (void) con_cls; /* Unused. Silent compiler warning. */ | 777 | (void) req_cls; /* Unused. Silent compiler warning. */ |
778 | (void) extra_in; /* Unused. Silent compiler warning. */ | 778 | (void) extra_in; /* Unused. Silent compiler warning. */ |
779 | (void) extra_in_size; /* Unused. Silent compiler warning. */ | 779 | (void) extra_in_size; /* Unused. Silent compiler warning. */ |
780 | 780 | ||
@@ -814,7 +814,7 @@ uh_cb (void *cls, struct MHD_Connection *con, void *con_cls, | |||
814 | static enum MHD_Result | 814 | static enum MHD_Result |
815 | ahc_cb (void *cls, struct MHD_Connection *con, const char *url, | 815 | ahc_cb (void *cls, struct MHD_Connection *con, const char *url, |
816 | const char *method, const char *version, const char *upload_data, | 816 | const char *method, const char *version, const char *upload_data, |
817 | size_t *upload_data_size, void **ptr) | 817 | size_t *upload_data_size, void **req_cls) |
818 | { | 818 | { |
819 | struct MHD_Response *res; | 819 | struct MHD_Response *res; |
820 | const char *upg_header; | 820 | const char *upg_header; |
@@ -830,12 +830,12 @@ ahc_cb (void *cls, struct MHD_Connection *con, const char *url, | |||
830 | (void) upload_data; /* Unused. Silent compiler warning. */ | 830 | (void) upload_data; /* Unused. Silent compiler warning. */ |
831 | (void) upload_data_size; /* Unused. Silent compiler warning. */ | 831 | (void) upload_data_size; /* Unused. Silent compiler warning. */ |
832 | 832 | ||
833 | if (NULL == *ptr) | 833 | if (NULL == *req_cls) |
834 | { | 834 | { |
835 | *ptr = (void *) 1; | 835 | *req_cls = (void *) 1; |
836 | return MHD_YES; | 836 | return MHD_YES; |
837 | } | 837 | } |
838 | *ptr = NULL; | 838 | *req_cls = NULL; |
839 | upg_header = MHD_lookup_connection_value (con, MHD_HEADER_KIND, | 839 | upg_header = MHD_lookup_connection_value (con, MHD_HEADER_KIND, |
840 | MHD_HTTP_HEADER_UPGRADE); | 840 | MHD_HTTP_HEADER_UPGRADE); |
841 | con_header = MHD_lookup_connection_value (con, MHD_HEADER_KIND, | 841 | con_header = MHD_lookup_connection_value (con, MHD_HEADER_KIND, |