aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index a260933c..f178f44e 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -242,9 +242,9 @@ str_conn_error_ (ssize_t mhd_err_code)
242 * @return pointer to allocated memory region in the pool or 242 * @return pointer to allocated memory region in the pool or
243 * NULL if no memory is available 243 * NULL if no memory is available
244 */ 244 */
245static void * 245void *
246connection_alloc_memory (struct MHD_Connection *connection, 246MHD_connection_alloc_memory_ (struct MHD_Connection *connection,
247 size_t size) 247 size_t size)
248{ 248{
249 struct MHD_Connection *const c = connection; /* a short alias */ 249 struct MHD_Connection *const c = connection; /* a short alias */
250 struct MemoryPool *const pool = c->pool; /* a short alias */ 250 struct MemoryPool *const pool = c->pool; /* a short alias */
@@ -482,8 +482,8 @@ MHD_set_connection_value_n_nocheck_ (struct MHD_Connection *connection,
482{ 482{
483 struct MHD_HTTP_Req_Header *pos; 483 struct MHD_HTTP_Req_Header *pos;
484 484
485 pos = connection_alloc_memory (connection, 485 pos = MHD_connection_alloc_memory_ (connection,
486 sizeof (struct MHD_HTTP_Res_Header)); 486 sizeof (struct MHD_HTTP_Res_Header));
487 if (NULL == pos) 487 if (NULL == pos)
488 return MHD_NO; 488 return MHD_NO;
489 pos->header = key; 489 pos->header = key;
@@ -1033,8 +1033,8 @@ try_ready_normal_body (struct MHD_Connection *connection)
1033 if (NULL != connection->resp_iov.iov) 1033 if (NULL != connection->resp_iov.iov)
1034 return MHD_YES; 1034 return MHD_YES;
1035 copy_size = response->data_iovcnt * sizeof(MHD_iovec_); 1035 copy_size = response->data_iovcnt * sizeof(MHD_iovec_);
1036 connection->resp_iov.iov = connection_alloc_memory (connection, 1036 connection->resp_iov.iov = MHD_connection_alloc_memory_ (connection,
1037 copy_size); 1037 copy_size);
1038 if (NULL == connection->resp_iov.iov) 1038 if (NULL == connection->resp_iov.iov)
1039 { 1039 {
1040 MHD_mutex_unlock_chk_ (&response->mutex); 1040 MHD_mutex_unlock_chk_ (&response->mutex);
@@ -3103,8 +3103,8 @@ parse_cookie_header (struct MHD_Connection *connection)
3103 if (0 == hdr_len) 3103 if (0 == hdr_len)
3104 return MHD_PARSE_COOKIE_OK; 3104 return MHD_PARSE_COOKIE_OK;
3105 3105
3106 cpy = connection_alloc_memory (connection, 3106 cpy = MHD_connection_alloc_memory_ (connection,
3107 hdr_len + 1); 3107 hdr_len + 1);
3108 if (NULL == cpy) 3108 if (NULL == cpy)
3109 return MHD_PARSE_COOKIE_NO_MEMORY; 3109 return MHD_PARSE_COOKIE_NO_MEMORY;
3110 3110