You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Yann Ylavic <yl...@gmail.com> on 2016/03/02 00:59:37 UTC
Re: svn commit: r1727603 - in /httpd/httpd/trunk: CHANGES server/mpm/event/event.c
On Fri, Jan 29, 2016 at 4:51 PM, <ic...@apache.org> wrote:
> Author: icing
> Date: Fri Jan 29 15:51:25 2016
> New Revision: 1727603
>
> URL: http://svn.apache.org/viewvc?rev=1727603&view=rev
> Log:
> event: slave connection init, vhost early config
>
> Modified:
> httpd/httpd/trunk/server/mpm/event/event.c
[]
>
> Modified: httpd/httpd/trunk/server/mpm/event/event.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1727603&r1=1727602&r2=1727603&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/mpm/event/event.c (original)
> +++ httpd/httpd/trunk/server/mpm/event/event.c Fri Jan 29 15:51:25 2016
> @@ -3293,6 +3293,55 @@ static int event_run(apr_pool_t * _pconf
> return OK;
> }
>
> +static void setup_slave_conn(conn_rec *c, void *csd)
> +{
> + event_conn_state_t *mcs;
> + event_conn_state_t *cs;
> +
> + mcs = ap_get_module_config(c->master->conn_config, &mpm_event_module);
> +
> + cs = apr_pcalloc(c->pool, sizeof(*cs));
> + cs->c = c;
> + cs->r = NULL;
> + cs->sc = mcs->sc;
> + cs->suspended = 0;
> + cs->p = c->pool;
> + cs->bucket_alloc = c->bucket_alloc;
Can the slave connection really have the same bucket_alloc as the master?
Can't both be processed (i.e. process_socket) at the same time?
> + cs->pfd = mcs->pfd;
> + cs->pub = mcs->pub;
Looks unnecessary, since the two pub's (only) fields below are overwritten.
> + cs->pub.state = CONN_STATE_READ_REQUEST_LINE;
> + cs->pub.sense = CONN_SENSE_DEFAULT;
> +
> + c->cs = &(cs->pub);
> + ap_set_module_config(c->conn_config, &mpm_event_module, cs);
> +}
Regards,
Yann.
Re: svn commit: r1727603 - in /httpd/httpd/trunk: CHANGES server/mpm/event/event.c
Posted by Yann Ylavic <yl...@gmail.com>.
On Wed, Mar 2, 2016 at 12:59 AM, Yann Ylavic <yl...@gmail.com> wrote:
> On Fri, Jan 29, 2016 at 4:51 PM, <ic...@apache.org> wrote:
>>
>> +static void setup_slave_conn(conn_rec *c, void *csd)
>> +{
>> + event_conn_state_t *mcs;
>> + event_conn_state_t *cs;
>> +
>> + mcs = ap_get_module_config(c->master->conn_config, &mpm_event_module);
>> +
>> + cs = apr_pcalloc(c->pool, sizeof(*cs));
>> + cs->c = c;
>> + cs->r = NULL;
>> + cs->sc = mcs->sc;
>> + cs->suspended = 0;
>> + cs->p = c->pool;
>> + cs->bucket_alloc = c->bucket_alloc;
>
> Can the slave connection really have the same bucket_alloc as the master?
> Can't both be processed (i.e. process_socket) at the same time?
Forget that, I have read it as: cs->bucket_alloc = mcs->bucket_alloc :p