diff options
Diffstat (limited to 'src/lib/response_for_upgrade.c')
-rw-r--r-- | src/lib/response_for_upgrade.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/response_for_upgrade.c b/src/lib/response_for_upgrade.c index 0d843b8e..ef66b029 100644 --- a/src/lib/response_for_upgrade.c +++ b/src/lib/response_for_upgrade.c | |||
@@ -57,21 +57,21 @@ | |||
57 | */ | 57 | */ |
58 | struct MHD_Response * | 58 | struct MHD_Response * |
59 | MHD_response_for_upgrade (MHD_UpgradeHandler upgrade_handler, | 59 | MHD_response_for_upgrade (MHD_UpgradeHandler upgrade_handler, |
60 | void *upgrade_handler_cls) | 60 | void *upgrade_handler_cls) |
61 | { | 61 | { |
62 | #ifdef UPGRADE_SUPPORT | 62 | #ifdef UPGRADE_SUPPORT |
63 | struct MHD_Response *response; | 63 | struct MHD_Response *response; |
64 | 64 | ||
65 | mhd_assert (NULL != upgrade_handler); | 65 | mhd_assert (NULL != upgrade_handler); |
66 | response = MHD_calloc_ (1, | 66 | response = MHD_calloc_ (1, |
67 | sizeof (struct MHD_Response)); | 67 | sizeof (struct MHD_Response)); |
68 | if (NULL == response) | 68 | if (NULL == response) |
69 | return NULL; | 69 | return NULL; |
70 | if (! MHD_mutex_init_ (&response->mutex)) | 70 | if (! MHD_mutex_init_ (&response->mutex)) |
71 | { | 71 | { |
72 | free (response); | 72 | free (response); |
73 | return NULL; | 73 | return NULL; |
74 | } | 74 | } |
75 | response->upgrade_handler = upgrade_handler; | 75 | response->upgrade_handler = upgrade_handler; |
76 | response->upgrade_handler_cls = upgrade_handler_cls; | 76 | response->upgrade_handler_cls = upgrade_handler_cls; |
77 | response->status_code = MHD_HTTP_SWITCHING_PROTOCOLS; | 77 | response->status_code = MHD_HTTP_SWITCHING_PROTOCOLS; |
@@ -81,10 +81,10 @@ MHD_response_for_upgrade (MHD_UpgradeHandler upgrade_handler, | |||
81 | MHD_response_add_header (response, | 81 | MHD_response_add_header (response, |
82 | MHD_HTTP_HEADER_CONNECTION, | 82 | MHD_HTTP_HEADER_CONNECTION, |
83 | "Upgrade")) | 83 | "Upgrade")) |
84 | { | 84 | { |
85 | MHD_response_queue_for_destroy (response); | 85 | MHD_response_queue_for_destroy (response); |
86 | return NULL; | 86 | return NULL; |
87 | } | 87 | } |
88 | return response; | 88 | return response; |
89 | #else | 89 | #else |
90 | return NULL; | 90 | return NULL; |