Changeset 19f2719 in mod_gnutls


Ignore:
Timestamp:
May 27, 2016, 12:26:15 PM (3 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
eda8686
Parents:
a9fa300
Message:

Update comments and formating in push/pull functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_io.c

    ra9fa300 r19f2719  
    787787
    788788    /* If Len = 0, we don't do anything. */
    789     if (!len || buffer == NULL) {
     789    if (!len || buffer == NULL)
     790    {
    790791        return 0;
    791792    }
    792     if (!ctxt->input_bb) {
     793    /* Input bucket brigade is missing, EOF */
     794    if (!ctxt->input_bb)
     795    {
    793796        ctxt->input_rc = APR_EOF;
    794797        gnutls_transport_set_errno(ctxt->session, ECONNABORTED);
     
    796799    }
    797800
    798     if (APR_BRIGADE_EMPTY(ctxt->input_bb)) {
    799 
     801    if (APR_BRIGADE_EMPTY(ctxt->input_bb))
     802    {
    800803        rc = ap_get_brigade(ctxt->input_filter->next,
    801                 ctxt->input_bb, AP_MODE_READBYTES,
    802                 ctxt->input_block, in);
     804                            ctxt->input_bb, AP_MODE_READBYTES,
     805                            ctxt->input_block, in);
    803806
    804807        /* Not a problem, there was simply no data ready yet.
     
    820823        }
    821824
    822         if (rc != APR_SUCCESS) {
     825        if (rc != APR_SUCCESS)
     826        {
    823827            /* Unexpected errors discard the brigade */
    824828            apr_brigade_cleanup(ctxt->input_bb);
     
    829833    }
    830834
    831     ctxt->input_rc =
    832             brigade_consume(ctxt->input_bb, block, buffer, &len);
    833 
    834     if (ctxt->input_rc == APR_SUCCESS) {
     835    ctxt->input_rc = brigade_consume(ctxt->input_bb, block, buffer, &len);
     836
     837    if (ctxt->input_rc == APR_SUCCESS)
     838    {
    835839        return (ssize_t) len;
    836840    }
     
    850854
    851855    /* Unexpected errors and APR_EOF clean out the brigade.
    852      * Subsequent calls will return APR_EOF.
    853      */
     856     * Subsequent calls will return APR_EOF. */
    854857    apr_brigade_cleanup(ctxt->input_bb);
    855858    ctxt->input_bb = NULL;
    856859
    857     if (APR_STATUS_IS_EOF(ctxt->input_rc) && len) {
    858         /* Provide the results of this read pass,
    859          * without resetting the BIO retry_read flag
    860          */
     860    if (APR_STATUS_IS_EOF(ctxt->input_rc) && len)
     861    {
     862        /* Some data has been received before EOF, return it. */
    861863        return (ssize_t) len;
    862864    }
     
    877879 */
    878880ssize_t mgs_transport_write(gnutls_transport_ptr_t ptr,
    879         const void *buffer, size_t len) {
     881                            const void *buffer, size_t len)
     882{
    880883    mgs_handle_t *ctxt = ptr;
    881884
Note: See TracChangeset for help on using the changeset viewer.