diff options
Diffstat (limited to 'src/microhttpd/test_upgrade_large.c')
-rw-r--r-- | src/microhttpd/test_upgrade_large.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/microhttpd/test_upgrade_large.c b/src/microhttpd/test_upgrade_large.c index 3ccb1985..1928080d 100644 --- a/src/microhttpd/test_upgrade_large.c +++ b/src/microhttpd/test_upgrade_large.c | |||
@@ -796,14 +796,14 @@ term_reason_str (enum MHD_RequestTerminationCode term_code) | |||
796 | * | 796 | * |
797 | * @param cls client-defined closure | 797 | * @param cls client-defined closure |
798 | * @param connection connection handle | 798 | * @param connection connection handle |
799 | * @param con_cls value as set by the last call to | 799 | * @param req_cls value as set by the last call to |
800 | * the #MHD_AccessHandlerCallback | 800 | * the #MHD_AccessHandlerCallback |
801 | * @param toe reason for request termination | 801 | * @param toe reason for request termination |
802 | */ | 802 | */ |
803 | static void | 803 | static void |
804 | notify_completed_cb (void *cls, | 804 | notify_completed_cb (void *cls, |
805 | struct MHD_Connection *connection, | 805 | struct MHD_Connection *connection, |
806 | void **con_cls, | 806 | void **req_cls, |
807 | enum MHD_RequestTerminationCode toe) | 807 | enum MHD_RequestTerminationCode toe) |
808 | { | 808 | { |
809 | (void) cls; | 809 | (void) cls; |
@@ -815,15 +815,15 @@ notify_completed_cb (void *cls, | |||
815 | (toe != MHD_REQUEST_TERMINATED_CLIENT_ABORT) && | 815 | (toe != MHD_REQUEST_TERMINATED_CLIENT_ABORT) && |
816 | (toe != MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN) ) | 816 | (toe != MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN) ) |
817 | mhdErrorExitDesc ("notify_completed_cb() called with wrong code"); | 817 | mhdErrorExitDesc ("notify_completed_cb() called with wrong code"); |
818 | if (NULL == con_cls) | 818 | if (NULL == req_cls) |
819 | mhdErrorExitDesc ("'con_cls' parameter is NULL"); | 819 | mhdErrorExitDesc ("'req_cls' parameter is NULL"); |
820 | if (NULL == *con_cls) | 820 | if (NULL == *req_cls) |
821 | mhdErrorExitDesc ("'*con_cls' pointer is NULL"); | 821 | mhdErrorExitDesc ("'*req_cls' pointer is NULL"); |
822 | if (! pthread_equal (**((pthread_t **) con_cls), | 822 | if (! pthread_equal (**((pthread_t **) req_cls), |
823 | pthread_self ())) | 823 | pthread_self ())) |
824 | mhdErrorExitDesc ("notify_completed_cb() is called in wrong thread"); | 824 | mhdErrorExitDesc ("notify_completed_cb() is called in wrong thread"); |
825 | free (*con_cls); | 825 | free (*req_cls); |
826 | *con_cls = NULL; | 826 | *req_cls = NULL; |
827 | } | 827 | } |
828 | 828 | ||
829 | 829 | ||
@@ -868,7 +868,7 @@ log_cb (void *cls, | |||
868 | * @param socket_context socket-specific pointer where the | 868 | * @param socket_context socket-specific pointer where the |
869 | * client can associate some state specific | 869 | * client can associate some state specific |
870 | * to the TCP connection; note that this is | 870 | * to the TCP connection; note that this is |
871 | * different from the "con_cls" which is per | 871 | * different from the "req_cls" which is per |
872 | * HTTP request. The client can initialize | 872 | * HTTP request. The client can initialize |
873 | * during #MHD_CONNECTION_NOTIFY_STARTED and | 873 | * during #MHD_CONNECTION_NOTIFY_STARTED and |
874 | * cleanup during #MHD_CONNECTION_NOTIFY_CLOSED | 874 | * cleanup during #MHD_CONNECTION_NOTIFY_CLOSED |
@@ -1139,7 +1139,7 @@ run_usock_client (void *cls) | |||
1139 | * @param connection original HTTP connection handle, | 1139 | * @param connection original HTTP connection handle, |
1140 | * giving the function a last chance | 1140 | * giving the function a last chance |
1141 | * to inspect the original HTTP request | 1141 | * to inspect the original HTTP request |
1142 | * @param con_cls last value left in `con_cls` of the `MHD_AccessHandlerCallback` | 1142 | * @param req_cls last value left in `req_cls` of the `MHD_AccessHandlerCallback` |
1143 | * @param extra_in if we happened to have read bytes after the | 1143 | * @param extra_in if we happened to have read bytes after the |
1144 | * HTTP header already (because the client sent | 1144 | * HTTP header already (because the client sent |
1145 | * more than the HTTP header of the request before | 1145 | * more than the HTTP header of the request before |
@@ -1164,7 +1164,7 @@ run_usock_client (void *cls) | |||
1164 | static void | 1164 | static void |
1165 | upgrade_cb (void *cls, | 1165 | upgrade_cb (void *cls, |
1166 | struct MHD_Connection *connection, | 1166 | struct MHD_Connection *connection, |
1167 | void *con_cls, | 1167 | void *req_cls, |
1168 | const char *extra_in, | 1168 | const char *extra_in, |
1169 | size_t extra_in_size, | 1169 | size_t extra_in_size, |
1170 | MHD_socket sock, | 1170 | MHD_socket sock, |
@@ -1172,7 +1172,7 @@ upgrade_cb (void *cls, | |||
1172 | { | 1172 | { |
1173 | (void) cls; | 1173 | (void) cls; |
1174 | (void) connection; | 1174 | (void) connection; |
1175 | (void) con_cls; | 1175 | (void) req_cls; |
1176 | (void) extra_in; /* Unused. Silent compiler warning. */ | 1176 | (void) extra_in; /* Unused. Silent compiler warning. */ |
1177 | 1177 | ||
1178 | usock = wr_create_from_plain_sckt (sock); | 1178 | usock = wr_create_from_plain_sckt (sock); |
@@ -1211,7 +1211,7 @@ upgrade_cb (void *cls, | |||
1211 | * @param upload_data_size set initially to the size of the | 1211 | * @param upload_data_size set initially to the size of the |
1212 | * @a upload_data provided; the method must update this | 1212 | * @a upload_data provided; the method must update this |
1213 | * value to the number of bytes NOT processed; | 1213 | * value to the number of bytes NOT processed; |
1214 | * @param con_cls pointer that the callback can set to some | 1214 | * @param req_cls pointer that the callback can set to some |
1215 | * address and that will be preserved by MHD for future | 1215 | * address and that will be preserved by MHD for future |
1216 | * calls for this request; since the access handler may | 1216 | * calls for this request; since the access handler may |
1217 | * be called many times (i.e., for a PUT/POST operation | 1217 | * be called many times (i.e., for a PUT/POST operation |
@@ -1220,7 +1220,7 @@ upgrade_cb (void *cls, | |||
1220 | * If necessary, this state can be cleaned up in the | 1220 | * If necessary, this state can be cleaned up in the |
1221 | * global #MHD_RequestCompletedCallback (which | 1221 | * global #MHD_RequestCompletedCallback (which |
1222 | * can be set with the #MHD_OPTION_NOTIFY_COMPLETED). | 1222 | * can be set with the #MHD_OPTION_NOTIFY_COMPLETED). |
1223 | * Initially, `*con_cls` will be NULL. | 1223 | * Initially, `*req_cls` will be NULL. |
1224 | * @return #MHD_YES if the connection was handled successfully, | 1224 | * @return #MHD_YES if the connection was handled successfully, |
1225 | * #MHD_NO if the socket must be closed due to a serious | 1225 | * #MHD_NO if the socket must be closed due to a serious |
1226 | * error while handling the request | 1226 | * error while handling the request |
@@ -1233,7 +1233,7 @@ ahc_upgrade (void *cls, | |||
1233 | const char *version, | 1233 | const char *version, |
1234 | const char *upload_data, | 1234 | const char *upload_data, |
1235 | size_t *upload_data_size, | 1235 | size_t *upload_data_size, |
1236 | void **con_cls) | 1236 | void **req_cls) |
1237 | { | 1237 | { |
1238 | struct MHD_Response *resp; | 1238 | struct MHD_Response *resp; |
1239 | (void) cls; | 1239 | (void) cls; |
@@ -1243,11 +1243,11 @@ ahc_upgrade (void *cls, | |||
1243 | (void) upload_data; | 1243 | (void) upload_data; |
1244 | (void) upload_data_size; /* Unused. Silent compiler warning. */ | 1244 | (void) upload_data_size; /* Unused. Silent compiler warning. */ |
1245 | 1245 | ||
1246 | if (NULL == con_cls) | 1246 | if (NULL == req_cls) |
1247 | mhdErrorExitDesc ("'con_cls' is NULL"); | 1247 | mhdErrorExitDesc ("'req_cls' is NULL"); |
1248 | if (NULL == *con_cls) | 1248 | if (NULL == *req_cls) |
1249 | mhdErrorExitDesc ("'*con_cls' value is NULL"); | 1249 | mhdErrorExitDesc ("'*req_cls' value is NULL"); |
1250 | if (! pthread_equal (**((pthread_t **) con_cls), pthread_self ())) | 1250 | if (! pthread_equal (**((pthread_t **) req_cls), pthread_self ())) |
1251 | mhdErrorExitDesc ("ahc_upgrade() is called in wrong thread"); | 1251 | mhdErrorExitDesc ("ahc_upgrade() is called in wrong thread"); |
1252 | resp = MHD_create_response_for_upgrade (&upgrade_cb, | 1252 | resp = MHD_create_response_for_upgrade (&upgrade_cb, |
1253 | NULL); | 1253 | NULL); |