fixed out queue allocation & made out_cork default value dependant on out_queue

This commit is contained in:
Roman Arutyunyan
2012-06-14 20:08:57 +04:00
parent 7c99cfba0a
commit 2fdec45460
2 changed files with 5 additions and 3 deletions

View File

@ -124,8 +124,9 @@ ngx_rtmp_init_session(ngx_connection_t *c, ngx_rtmp_addr_conf_t *addr_conf)
ngx_rtmp_log_ctx_t *ctx;
s = ngx_pcalloc(c->pool, sizeof(ngx_rtmp_session_t) +
((ngx_rtmp_core_srv_conf_t *)addr_conf->ctx->srv_conf)->out_queue
* sizeof(ngx_chain_t *));
sizeof(ngx_chain_t *) * ((ngx_rtmp_core_srv_conf_t *)
addr_conf->ctx-> srv_conf[ngx_rtmp_core_module
.ctx_index])->out_queue);
if (s == NULL) {
ngx_rtmp_close_connection(c);
return NULL;