View | Details | Raw Unified | Return to bug 51747
Collapse All | Expand All

(-)mod_fcgid-2.3.7/modules/fcgid/fcgid_proc_unix.c (-3 / +8 lines)
Lines 774-783 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
774
    struct iovec vec[FCGID_VEC_COUNT];
774
    struct iovec vec[FCGID_VEC_COUNT];
775
    int nvec = 0;
775
    int nvec = 0;
776
    apr_bucket *e;
776
    apr_bucket *e;
777
    apr_bucket_brigade* tmpbb = apr_brigade_create(output_brigade->p,output_brigade->bucket_alloc);
778
779
    while ((e = APR_BRIGADE_FIRST(output_brigade)) != APR_BRIGADE_SENTINEL(output_brigade)) {
780
        APR_BUCKET_REMOVE(e);
777
781
778
    for (e = APR_BRIGADE_FIRST(output_brigade);
779
         e != APR_BRIGADE_SENTINEL(output_brigade);
780
         e = APR_BUCKET_NEXT(e)) {
781
        apr_size_t len;
782
        apr_size_t len;
782
        const char* base;
783
        const char* base;
783
784
Lines 792-797 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
792
            return rv;
793
            return rv;
793
        }
794
        }
794
795
796
        APR_BRIGADE_INSERT_TAIL(tmpbb, e);
797
795
        vec[nvec].iov_len = len;
798
        vec[nvec].iov_len = len;
796
        vec[nvec].iov_base = (char*) base;
799
        vec[nvec].iov_base = (char*) base;
797
        if (nvec == (FCGID_VEC_COUNT - 1)) {
800
        if (nvec == (FCGID_VEC_COUNT - 1)) {
Lines 801-806 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
801
                               FCGID_VEC_COUNT)) != APR_SUCCESS)
804
                               FCGID_VEC_COUNT)) != APR_SUCCESS)
802
                return rv;
805
                return rv;
803
            nvec = 0;
806
            nvec = 0;
807
            apr_brigade_cleanup(tmpbb);
804
        }
808
        }
805
        else
809
        else
806
            nvec++;
810
            nvec++;
Lines 812-817 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
812
            return rv;
816
            return rv;
813
    }
817
    }
814
818
819
    apr_brigade_destroy(tmpbb);
815
    return APR_SUCCESS;
820
    return APR_SUCCESS;
816
}
821
}

Return to bug 51747