Lines Matching refs:response
51 add_response_entry (struct MHD_Response *response, in add_response_entry() argument
58 if ( (NULL == response) || in add_response_entry()
84 hdr->next = response->first_header; in add_response_entry()
85 response->first_header = hdr; in add_response_entry()
100 MHD_add_response_header (struct MHD_Response *response, in MHD_add_response_header() argument
103 return add_response_entry (response, in MHD_add_response_header()
120 MHD_add_response_footer (struct MHD_Response *response, in MHD_add_response_footer() argument
123 return add_response_entry (response, in MHD_add_response_footer()
140 MHD_del_response_header (struct MHD_Response *response, in MHD_del_response_header() argument
150 pos = response->first_header; in MHD_del_response_header()
159 response->first_header = pos->next; in MHD_del_response_header()
183 MHD_get_response_headers (struct MHD_Response *response, in MHD_get_response_headers() argument
189 for (pos = response->first_header; NULL != pos; pos = pos->next) in MHD_get_response_headers()
210 MHD_get_response_header (struct MHD_Response *response, in MHD_get_response_header() argument
217 for (pos = response->first_header; NULL != pos; pos = pos->next) in MHD_get_response_header()
247 struct MHD_Response *response; in MHD_create_response_from_callback() local
251 if (NULL == (response = malloc (sizeof (struct MHD_Response) + block_size))) in MHD_create_response_from_callback()
253 memset (response, 0, sizeof (struct MHD_Response)); in MHD_create_response_from_callback()
254 response->fd = -1; in MHD_create_response_from_callback()
255 response->data = (void *) &response[1]; in MHD_create_response_from_callback()
256 response->data_buffer_size = block_size; in MHD_create_response_from_callback()
257 if (MHD_YES != MHD_mutex_create_ (&response->mutex)) in MHD_create_response_from_callback()
259 free (response); in MHD_create_response_from_callback()
262 response->crc = crc; in MHD_create_response_from_callback()
263 response->crfc = crfc; in MHD_create_response_from_callback()
264 response->crc_cls = crc_cls; in MHD_create_response_from_callback()
265 response->reference_count = 1; in MHD_create_response_from_callback()
266 response->total_size = size; in MHD_create_response_from_callback()
267 return response; in MHD_create_response_from_callback()
280 MHD_set_response_options (struct MHD_Response *response, in MHD_set_response_options() argument
289 response->flags = flags; in MHD_set_response_options()
318 struct MHD_Response *response = cls; in file_reader() local
321 (void) lseek (response->fd, pos + response->fd_off, SEEK_SET); in file_reader()
322 n = read (response->fd, buf, max); in file_reader()
340 struct MHD_Response *response = cls; in free_callback() local
342 (void) close (response->fd); in free_callback()
343 response->fd = -1; in free_callback()
368 struct MHD_Response *response; in MHD_create_response_from_fd_at_offset() local
370 response = MHD_create_response_from_callback (size, in MHD_create_response_from_fd_at_offset()
375 if (NULL == response) in MHD_create_response_from_fd_at_offset()
377 response->fd = fd; in MHD_create_response_from_fd_at_offset()
378 response->fd_off = offset; in MHD_create_response_from_fd_at_offset()
379 response->crc_cls = response; in MHD_create_response_from_fd_at_offset()
380 return response; in MHD_create_response_from_fd_at_offset()
419 struct MHD_Response *response; in MHD_create_response_from_data() local
424 if (NULL == (response = malloc (sizeof (struct MHD_Response)))) in MHD_create_response_from_data()
426 memset (response, 0, sizeof (struct MHD_Response)); in MHD_create_response_from_data()
427 response->fd = -1; in MHD_create_response_from_data()
428 if (MHD_YES != MHD_mutex_create_ (&response->mutex)) in MHD_create_response_from_data()
430 free (response); in MHD_create_response_from_data()
437 (void) MHD_mutex_destroy_ (&response->mutex); in MHD_create_response_from_data()
438 free (response); in MHD_create_response_from_data()
445 response->crc = NULL; in MHD_create_response_from_data()
446 response->crfc = must_free ? &free : NULL; in MHD_create_response_from_data()
447 response->crc_cls = must_free ? data : NULL; in MHD_create_response_from_data()
448 response->reference_count = 1; in MHD_create_response_from_data()
449 response->total_size = size; in MHD_create_response_from_data()
450 response->data = data; in MHD_create_response_from_data()
451 response->data_size = size; in MHD_create_response_from_data()
452 return response; in MHD_create_response_from_data()
488 MHD_destroy_response (struct MHD_Response *response) in MHD_destroy_response() argument
492 if (NULL == response) in MHD_destroy_response()
494 (void) MHD_mutex_lock_ (&response->mutex); in MHD_destroy_response()
495 if (0 != --(response->reference_count)) in MHD_destroy_response()
497 (void) MHD_mutex_unlock_ (&response->mutex); in MHD_destroy_response()
500 (void) MHD_mutex_unlock_ (&response->mutex); in MHD_destroy_response()
501 (void) MHD_mutex_destroy_ (&response->mutex); in MHD_destroy_response()
502 if (response->crfc != NULL) in MHD_destroy_response()
503 response->crfc (response->crc_cls); in MHD_destroy_response()
504 while (NULL != response->first_header) in MHD_destroy_response()
506 pos = response->first_header; in MHD_destroy_response()
507 response->first_header = pos->next; in MHD_destroy_response()
512 free (response); in MHD_destroy_response()
517 MHD_increment_response_rc (struct MHD_Response *response) in MHD_increment_response_rc() argument
519 (void) MHD_mutex_lock_ (&response->mutex); in MHD_increment_response_rc()
520 (response->reference_count)++; in MHD_increment_response_rc()
521 (void) MHD_mutex_unlock_ (&response->mutex); in MHD_increment_response_rc()