added queue init

This commit is contained in:
Roman Arutyunyan 2014-09-21 10:17:58 +04:00
parent e1f92b1409
commit 5fb4c99ca9
2 changed files with 16 additions and 1 deletions

View file

@ -29,6 +29,7 @@ static ngx_int_t ngx_rtmp_init_event_handlers(ngx_conf_t *cf,
static char * ngx_rtmp_merge_applications(ngx_conf_t *cf,
ngx_array_t *applications, void **app_conf, ngx_rtmp_module_t *module,
ngx_uint_t ctx_index);
static ngx_int_t ngx_rtmp_init_process(ngx_cycle_t *cycle);
#if (nginx_version >= 1007005)
@ -68,7 +69,7 @@ ngx_module_t ngx_rtmp_module = {
NGX_CORE_MODULE, /* module type */
NULL, /* init master */
NULL, /* init module */
NULL, /* init process */
ngx_rtmp_init_process, /* init process */
NULL, /* init thread */
NULL, /* exit thread */
NULL, /* exit process */
@ -831,3 +832,13 @@ ngx_rtmp_rmemcpy(void *dst, const void* src, size_t n)
return dst;
}
static ngx_int_t
ngx_rtmp_init_process(ngx_cycle_t *cycle)
{
#if (nginx_version >= 1007005)
ngx_queue_init(&ngx_rtmp_init_queue);
#endif
return NGX_OK;
}

View file

@ -197,6 +197,10 @@ ngx_rtmp_init_session(ngx_connection_t *c, ngx_rtmp_addr_conf_t *addr_conf)
return NULL;
}
#if (nginx_version >= 1007005)
ngx_queue_init(&s->posted_dry_events);
#endif
s->epoch = ngx_current_msec;
s->timeout = cscf->timeout;
s->buflen = cscf->buflen;