Skip to content

Commit 5fb4c99

Browse files
committed
added queue init
1 parent e1f92b1 commit 5fb4c99

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

ngx_rtmp.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ static ngx_int_t ngx_rtmp_init_event_handlers(ngx_conf_t *cf,
2929
static char * ngx_rtmp_merge_applications(ngx_conf_t *cf,
3030
ngx_array_t *applications, void **app_conf, ngx_rtmp_module_t *module,
3131
ngx_uint_t ctx_index);
32+
static ngx_int_t ngx_rtmp_init_process(ngx_cycle_t *cycle);
3233

3334

3435
#if (nginx_version >= 1007005)
@@ -68,7 +69,7 @@ ngx_module_t ngx_rtmp_module = {
6869
NGX_CORE_MODULE, /* module type */
6970
NULL, /* init master */
7071
NULL, /* init module */
71-
NULL, /* init process */
72+
ngx_rtmp_init_process, /* init process */
7273
NULL, /* init thread */
7374
NULL, /* exit thread */
7475
NULL, /* exit process */
@@ -831,3 +832,13 @@ ngx_rtmp_rmemcpy(void *dst, const void* src, size_t n)
831832

832833
return dst;
833834
}
835+
836+
837+
static ngx_int_t
838+
ngx_rtmp_init_process(ngx_cycle_t *cycle)
839+
{
840+
#if (nginx_version >= 1007005)
841+
ngx_queue_init(&ngx_rtmp_init_queue);
842+
#endif
843+
return NGX_OK;
844+
}

ngx_rtmp_init.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ ngx_rtmp_init_session(ngx_connection_t *c, ngx_rtmp_addr_conf_t *addr_conf)
197197
return NULL;
198198
}
199199

200+
#if (nginx_version >= 1007005)
201+
ngx_queue_init(&s->posted_dry_events);
202+
#endif
203+
200204
s->epoch = ngx_current_msec;
201205
s->timeout = cscf->timeout;
202206
s->buflen = cscf->buflen;

0 commit comments

Comments
 (0)