Changeset dcf1118 in mod_gnutls


Ignore:
Timestamp:
Jul 21, 2009, 4:46:13 PM (10 years ago)
Author:
Nokis Mavrogiannopoulos <nmav@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
9085f5b
Parents:
daf3dc9
git-author:
Nikos Mavrogiannopoulos <nmav@…> (07/21/09 16:46:13)
git-committer:
Nokis Mavrogiannopoulos <nmav@…> (07/21/09 16:46:13)
Message:

On connection termination be polite and send a bye (common handling of EOC and EOS).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_io.c

    rdaf3dc9 rdcf1118  
    369369        ret = gnutls_handshake(ctxt->session);
    370370        maxtries--;
    371     } while (ret == GNUTLS_E_AGAIN && maxtries > 0);
     371    } while ((ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN) && maxtries > 0);
    372372
    373373    if (maxtries < 1) {
     
    382382        if (ctxt->session) {
    383383            gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL,
    384                           gnutls_error_to_alert(ret, NULL));
     384                          gnutls_error_to_alert(GNUTLS_E_INTERNAL_ERROR, NULL));
    385385            gnutls_deinit(ctxt->session);
    386386        }
     
    548548    while (!APR_BRIGADE_EMPTY(bb)) {
    549549        apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
    550         if (AP_BUCKET_IS_EOC(bucket)) {
     550       
     551        if (AP_BUCKET_IS_EOC(bucket) || APR_BUCKET_IS_EOS(bucket)) {
     552            apr_bucket_brigade * tmpb;
     553           
     554            if (APR_BUCKET_IS_EOS(bucket)) {
     555                tmpb = bb;
     556            } else {
     557                tmpb = ctxt->output_bb;
     558            }
     559           
    551560            if (ctxt->session != NULL) {
    552561                do {
     
    558567            APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e);
    559568           
    560             if ((status = ap_pass_brigade(f->next, ctxt->output_bb)) != APR_SUCCESS) {
     569            if ((status = ap_pass_brigade(f->next, tmpb)) != APR_SUCCESS) {
    561570                apr_brigade_cleanup(ctxt->output_bb);
    562571                return status;
     
    569578            }
    570579            continue;
    571 
    572         } else if (APR_BUCKET_IS_FLUSH(bucket) || APR_BUCKET_IS_EOS(bucket)) {
     580        } else if (APR_BUCKET_IS_FLUSH(bucket)) {
    573581
    574582            apr_bucket_copy(bucket, &e);
Note: See TracChangeset for help on using the changeset viewer.