Commit bb4c7e87 authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

removing unused constants and fixing configuration of channels statistics handler

parent dd12880f
...@@ -12,12 +12,7 @@ ...@@ -12,12 +12,7 @@
#include <ngx_http_push_stream_module_publisher.h> #include <ngx_http_push_stream_module_publisher.h>
#include <ngx_http_push_stream_module_subscriber.h> #include <ngx_http_push_stream_module_subscriber.h>
#define NGX_HTTP_PUSH_STREAM_MAX_CHANNEL_ID_LENGTH 1024 // bytes
//
//#define NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_SIZE 33554432 // 32 megs //#define NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_SIZE 33554432 // 32 megs
#define NGX_HTTP_PUSH_STREAM_DEFAULT_BUFFER_TIMEOUT 7200 // 2 hours
#define NGX_HTTP_PUSH_STREAM_DEFAULT_MAX_MESSAGES 10
#define NGX_HTTP_PUSH_STREAM_DEFAULT_HEADER_TEMPLATE "" #define NGX_HTTP_PUSH_STREAM_DEFAULT_HEADER_TEMPLATE ""
#define NGX_HTTP_PUSH_STREAM_DEFAULT_MESSAGE_TEMPLATE "" #define NGX_HTTP_PUSH_STREAM_DEFAULT_MESSAGE_TEMPLATE ""
......
...@@ -391,7 +391,17 @@ ngx_http_push_stream_setup_handler(ngx_conf_t *cf, void *conf, ngx_int_t (*handl ...@@ -391,7 +391,17 @@ ngx_http_push_stream_setup_handler(ngx_conf_t *cf, void *conf, ngx_int_t (*handl
static char * static char *
push_stream_channels_statistics(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) push_stream_channels_statistics(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{ {
return ngx_http_push_stream_setup_handler(cf, conf, &push_stream_channels_statistics_handler); char *rc = ngx_http_push_stream_setup_handler(cf, conf, &push_stream_channels_statistics_handler);
if (rc == NGX_CONF_OK) {
ngx_http_push_stream_loc_conf_t *pslcf = conf;
pslcf->index_channel_id = ngx_http_get_variable_index(cf, &ngx_http_push_stream_channel_id);
if (pslcf->index_channel_id == NGX_ERROR) {
rc = NGX_CONF_ERROR;
}
}
return rc;
} }
static char * static char *
...@@ -458,8 +468,6 @@ ngx_http_push_stream_init_shm_zone(ngx_shm_zone_t *shm_zone, void *data) ...@@ -458,8 +468,6 @@ ngx_http_push_stream_init_shm_zone(ngx_shm_zone_t *shm_zone, void *data)
ngx_rbtree_node_t *sentinel; ngx_rbtree_node_t *sentinel;
ngx_http_push_stream_shm_data_t *d; ngx_http_push_stream_shm_data_t *d;
ngx_http_push_stream_shpool = shpool; // we'll be using this a bit.
if ((d = (ngx_http_push_stream_shm_data_t *) ngx_slab_alloc(shpool, sizeof(*d))) == NULL) { //shm_data plus an array. if ((d = (ngx_http_push_stream_shm_data_t *) ngx_slab_alloc(shpool, sizeof(*d))) == NULL) { //shm_data plus an array.
return NGX_ERROR; return NGX_ERROR;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment