Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 123852 | Differences between
and this patch

Collapse All | Expand All

(-)src/filterobject.c (-1 / +1 lines)
Lines 178-184 Link Here
178
                                  APR_BLOCK_READ, self->readbytes);
178
                                  APR_BLOCK_READ, self->readbytes);
179
        Py_END_ALLOW_THREADS;
179
        Py_END_ALLOW_THREADS;
180
180
181
        if (!APR_STATUS_IS_EAGAIN(self->rc) && !APR_STATUS_IS_SUCCESS(self->rc)) {
181
        if (!APR_STATUS_IS_EAGAIN(self->rc) && !(self->rc == APR_SUCCESS)) {
182
            PyErr_SetObject(PyExc_IOError, 
182
            PyErr_SetObject(PyExc_IOError, 
183
                            PyString_FromString("Input filter read error"));
183
                            PyString_FromString("Input filter read error"));
184
            return NULL;
184
            return NULL;
(-)src/connobject.c (-7 / +7 lines)
Lines 79-85 Link Here
79
        rc = ap_get_brigade(c->input_filters, bb, mode, APR_BLOCK_READ, bufsize);
79
        rc = ap_get_brigade(c->input_filters, bb, mode, APR_BLOCK_READ, bufsize);
80
        Py_END_ALLOW_THREADS;
80
        Py_END_ALLOW_THREADS;
81
81
82
        if (! APR_STATUS_IS_SUCCESS(rc)) {
82
        if (rc != APR_SUCCESS) {
83
            PyErr_SetObject(PyExc_IOError, 
83
            PyErr_SetObject(PyExc_IOError, 
84
                            PyString_FromString("Connection read error"));
84
                            PyString_FromString("Connection read error"));
85
            return NULL;
85
            return NULL;
Lines 319-332 Link Here
319
{
319
{
320
    PyObject *addrobj = makeipaddr(addr);
320
    PyObject *addrobj = makeipaddr(addr);
321
    PyObject *ret = NULL;
321
    PyObject *ret = NULL;
322
323
    /* apr_sockaddr_port_get was deprecated and removed in apr 1.x
324
     * Access the port directly instead
325
     */
322
    if (addrobj) {
326
    if (addrobj) {
323
        apr_port_t port;
327
        apr_port_t port;
324
        if(apr_sockaddr_port_get(&port, addr)==APR_SUCCESS) {
328
        port = addr->port; 
325
            ret = Py_BuildValue("Oi", addrobj, port );
329
        ret = Py_BuildValue("Oi", addrobj, port );
326
        }
327
        else {
328
            PyErr_SetString(PyExc_SystemError,"apr_sockaddr_port_get failure");
329
        }
330
        Py_DECREF(addrobj);
330
        Py_DECREF(addrobj);
331
    }
331
    }
332
    return ret;
332
    return ret;

Return to bug 123852