Changeset 0b3bc05 in mod_gnutls
- Timestamp:
- Dec 2, 2004, 4:35:29 PM (18 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, msva, proxy-ticket, upstream
- Children:
- 0314deb
- Parents:
- ed47098
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_io.c
red47098 r0b3bc05 373 373 return; 374 374 #else 375 ret = gnutls_handshake(ctxt->session);375 ret = gnutls_handshake(ctxt->session); 376 376 if (ret < 0) { 377 377 if (ret == GNUTLS_E_WARNING_ALERT_RECEIVED … … 420 420 421 421 if (ctxt->status < 0) { 422 //return ap_get_brigade(f->next, bb, mode, block, readbytes);422 return ap_get_brigade(f->next, bb, mode, block, readbytes); 423 423 } 424 424 … … 486 486 while (!APR_BRIGADE_EMPTY(bb)) { 487 487 apr_bucket *bucket = APR_BRIGADE_FIRST(bb); 488 if (APR_BUCKET_IS_EOS(bucket) || APR_BUCKET_IS_FLUSH(bucket)) { 489 /** TODO: GnuTLS doesn't have a special flush method? **/ 488 if (APR_BUCKET_IS_EOS(bucket)) { 489 490 /* gnutls_bye(ctxt->session, GNUTLS_SHUT_RDWR); */ 491 490 492 if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) { 491 493 return status; 492 494 } 493 495 break; 494 } 495 else if (AP_BUCKET_IS_EOC(bucket)) { 496 gnutls_bye(ctxt->session, GNUTLS_SHUT_WR); 496 497 } else if (APR_BUCKET_IS_FLUSH(bucket)) { 497 498 498 499 if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) { … … 500 501 } 501 502 break; 503 504 } 505 else if (AP_BUCKET_IS_EOC(bucket)) { 506 507 gnutls_bye(ctxt->session, GNUTLS_SHUT_WR); 508 gnutls_deinit(ctxt->session); 509 if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) { 510 return status; 511 } 512 break; 513 502 514 } 503 515 else { 516 504 517 /* filter output */ 505 518 const char *data; … … 519 532 } 520 533 521 ret = gnutls_record_send(ctxt->session, data, len); 534 do { 535 ret = gnutls_record_send(ctxt->session, data, len); 536 } 537 while(ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN); 522 538 523 539 if (ret < 0) { … … 532 548 } 533 549 else if ((apr_size_t) ret != len) { 550 //apr_bucket_split(bucket, ret); 551 //APR_BUCKET_REMOVE(bucket); 534 552 /* not all of the data was sent. */ 535 553 /* mod_ssl basicly errors out here.. this doesn't seem right? */ … … 539 557 " of %" APR_SIZE_T_FMT " bytes.", 540 558 len - (apr_size_t) ret, len); 559 //continue; 541 560 if (ctxt->output_rc == APR_SUCCESS) { 542 561 ctxt->output_rc = APR_EGENERAL;
Note: See TracChangeset
for help on using the changeset viewer.