Changeset 485d28e in mod_gnutls for src/gnutls_io.c
- Timestamp:
- Sep 19, 2011, 10:25:46 PM (9 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, msva, proxy-ticket, upstream
- Children:
- bb24ee8
- Parents:
- cac3a7f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_io.c
rcac3a7f r485d28e 539 539 } 540 540 541 static ssize_t write_flush(mgs_handle_t * ctxt) 542 { 543 apr_bucket *e; 544 545 if (!(ctxt->output_blen || ctxt->output_length)) { 546 ctxt->output_rc = APR_SUCCESS; 547 return 1; 548 } 549 550 if (ctxt->output_blen) { 551 e = apr_bucket_transient_create(ctxt->output_buffer, 552 ctxt->output_blen, 553 ctxt->output_bb-> 554 bucket_alloc); 555 /* we filled this buffer first so add it to the 556 * * head of the brigade 557 * */ 558 APR_BRIGADE_INSERT_HEAD(ctxt->output_bb, e); 559 ctxt->output_blen = 0; 560 } 561 562 ctxt->output_length = 0; 563 e = apr_bucket_flush_create(ctxt->output_bb->bucket_alloc); 564 APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e); 565 566 ctxt->output_rc = ap_pass_brigade(ctxt->output_filter->next, 567 ctxt->output_bb); 568 /* clear the brigade to be ready for next time */ 569 apr_brigade_cleanup(ctxt->output_bb); 570 571 return (ctxt->output_rc == APR_SUCCESS) ? 1 : -1; 572 } 573 541 574 apr_status_t mgs_filter_output(ap_filter_t * f, apr_bucket_brigade * bb) 542 575 { … … 742 775 } 743 776 744 745 static ssize_t write_flush(mgs_handle_t * ctxt)746 {747 apr_bucket *e;748 749 if (!(ctxt->output_blen || ctxt->output_length)) {750 ctxt->output_rc = APR_SUCCESS;751 return 1;752 }753 754 if (ctxt->output_blen) {755 e = apr_bucket_transient_create(ctxt->output_buffer,756 ctxt->output_blen,757 ctxt->output_bb->758 bucket_alloc);759 /* we filled this buffer first so add it to the760 * head of the brigade761 */762 APR_BRIGADE_INSERT_HEAD(ctxt->output_bb, e);763 ctxt->output_blen = 0;764 }765 766 ctxt->output_length = 0;767 e = apr_bucket_flush_create(ctxt->output_bb->bucket_alloc);768 APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e);769 770 ctxt->output_rc = ap_pass_brigade(ctxt->output_filter->next,771 ctxt->output_bb);772 /* clear the brigade to be ready for next time */773 apr_brigade_cleanup(ctxt->output_bb);774 775 return (ctxt->output_rc == APR_SUCCESS) ? 1 : -1;776 }777 778 777 ssize_t mgs_transport_write(gnutls_transport_ptr_t ptr, 779 778 const void *buffer, size_t len)
Note: See TracChangeset
for help on using the changeset viewer.