Changeset 5508683 in mod_gnutls for src/gnutls_io.c
- Timestamp:
- Jan 11, 2013, 12:58:10 AM (8 years ago)
- Branches:
- debian/master, debian/stretch-backports, jessie-backports, upstream
- Children:
- 17eb1a1, 9c4a744
- Parents:
- bbb9bb1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_io.c
rbbb9bb1 r5508683 222 222 } 223 223 } 224 225 if (ctxt->session == NULL) { 226 return APR_EGENERAL; 227 } 224 228 225 229 while (1) { … … 361 365 int maxtries = HANDSHAKE_MAX_TRIES; 362 366 363 if (ctxt->status != 0 ) {367 if (ctxt->status != 0 || ctxt->session == NULL) { 364 368 return -1; 365 369 } … … 442 446 { 443 447 int rv; 448 449 if (ctxt->session == NULL) 450 return -1; 444 451 445 452 rv = gnutls_rehandshake(ctxt->session); … … 566 573 apr_bucket_copy(bucket, &e); 567 574 APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e); 568 575 569 576 if ((status = ap_pass_brigade(f->next, tmpb)) != APR_SUCCESS) { 570 577 apr_brigade_cleanup(ctxt->output_bb); … … 610 617 if (len > 0) { 611 618 612 do { 613 ret = gnutls_record_send(ctxt->session, data, len); 614 } 615 while(ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN); 619 if (ctxt->session == NULL) { 620 ret = GNUTLS_E_INVALID_REQUEST; 621 } else { 622 do { 623 ret = gnutls_record_send(ctxt->session, data, len); 624 } 625 while(ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN); 626 } 616 627 617 628 if (ret < 0) { … … 675 686 return 0; 676 687 } else { 677 gnutls_transport_set_errno(ctxt->session, EINTR); 688 if (ctxt->session) 689 gnutls_transport_set_errno(ctxt->session, EINTR); 678 690 return -1; 679 691 } … … 698 710 || APR_STATUS_IS_EINTR(ctxt->input_rc)) { 699 711 if (len == 0) { 700 gnutls_transport_set_errno(ctxt->session, EINTR); 712 if (ctxt->session) 713 gnutls_transport_set_errno(ctxt->session, EINTR); 701 714 return -1; 702 715 }
Note: See TracChangeset
for help on using the changeset viewer.