src/nc_connection.c
/*
 * Return the context associated with this connection.
 */
Return the context associated with this connection.
Return the context associated with this connection .
struct context *
conn_to_ctx(struct conn *conn)
{
    struct server_pool *pool;
    if (conn->notice) {
        struct thread_data *tdata;
        tdata = conn->owner;
        return tdata->ctx;
    }
    if (conn->source_type == NC_SOURCE_TYPE_PROXY) {
        struct manage *manager = conn->owner;
        return manager->ctx;
    }
    if (conn->proxy || conn->client) {
        pool = conn->owner;
    } else {
        struct server *server = conn->owner;
        pool = server->owner;
    }
    return pool->ctx;
}
struct context * conn_to_ctx ( struct conn * conn ) { struct server_pool * pool ; if ( conn -> notice ) { struct thread_data * tdata ; tdata = conn -> owner ; return tdata -> ctx ; } if ( conn -> source_type == NC_SOURCE_TYPE_PROXY ) { struct manage * manager = conn -> owner ; return manager -> ctx ; } if ( conn -> proxy || conn -> client ) { pool = conn -> owner ; } else { struct server * server = conn -> owner ; pool = server -> owner ; } return pool -> ctx ; }
Return the context associated with this connection.
Return the context associated with this connection .