Commit 467376d3 authored by Wandenberg's avatar Wandenberg

fix some functions definitions to be possible compile with clang

parent 1a79b025
......@@ -62,7 +62,7 @@ static ngx_int_t ngx_http_push_stream_send_worker_message_locked(ngx_http
static ngx_int_t ngx_http_push_stream_init_ipc(ngx_cycle_t *cycle, ngx_int_t workers);
static void ngx_http_push_stream_ipc_exit_worker(ngx_cycle_t *cycle);
static ngx_int_t ngx_http_push_stream_ipc_init_worker();
static ngx_int_t ngx_http_push_stream_ipc_init_worker(void);
static void ngx_http_push_stream_clean_worker_data(ngx_http_push_stream_shm_data_t *data);
static void ngx_http_push_stream_channel_handler(ngx_event_t *ev);
static void ngx_http_push_stream_alert_shutting_down_workers(void);
......
......@@ -245,7 +245,7 @@ static ngx_int_t ngx_http_push_stream_send_response_text(ngx_http_req
static void ngx_http_push_stream_send_response_finalize(ngx_http_request_t *r);
static void ngx_http_push_stream_send_response_finalize_for_longpolling_by_timeout(ngx_http_request_t *r);
static ngx_int_t ngx_http_push_stream_send_websocket_close_frame(ngx_http_request_t *r, ngx_uint_t http_status, const ngx_str_t *reason);
static ngx_int_t ngx_http_push_stream_memory_cleanup();
static ngx_int_t ngx_http_push_stream_memory_cleanup(void);
ngx_chain_t * ngx_http_push_stream_get_buf(ngx_http_request_t *r);
static void ngx_http_push_stream_unescape_uri(ngx_str_t *value);
......@@ -262,7 +262,7 @@ static void ngx_http_push_stream_buffer_timer_wake_handler(ngx_e
static void ngx_http_push_stream_timer_set(ngx_msec_t timer_interval, ngx_event_t *event, ngx_event_handler_pt event_handler, ngx_flag_t start_timer);
static void ngx_http_push_stream_timer_reset(ngx_msec_t timer_interval, ngx_event_t *timer_event);
#define ngx_http_push_stream_memory_cleanup_timer_set() ngx_http_push_stream_timer_set(NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_INTERVAL, &ngx_http_push_stream_memory_cleanup_event, ngx_http_push_stream_memory_cleanup_timer_wake_handler, 1);
#define ngx_http_push_stream_memory_cleanup_timer_set(void) ngx_http_push_stream_timer_set(NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_INTERVAL, &ngx_http_push_stream_memory_cleanup_event, ngx_http_push_stream_memory_cleanup_timer_wake_handler, 1);
#define ngx_http_push_stream_buffer_cleanup_timer_set(pslcf) ngx_http_push_stream_timer_set(NGX_HTTP_PUSH_STREAM_MESSAGE_BUFFER_CLEANUP_INTERVAL, &ngx_http_push_stream_buffer_cleanup_event, ngx_http_push_stream_buffer_timer_wake_handler, pslcf->store_messages);
static void ngx_http_push_stream_worker_subscriber_cleanup_locked(ngx_http_push_stream_subscriber_t *worker_subscriber);
......
......@@ -34,8 +34,8 @@
#include <ngx_http_push_stream_module_ipc.h>
void ngx_http_push_stream_ipc_init_worker_data(ngx_http_push_stream_shm_data_t *data);
ngx_inline void ngx_http_push_stream_census_worker_subscribers_data(ngx_http_push_stream_shm_data_t *data);
ngx_inline void ngx_http_push_stream_process_worker_message_data(ngx_http_push_stream_shm_data_t *data);
static ngx_inline void ngx_http_push_stream_census_worker_subscribers_data(ngx_http_push_stream_shm_data_t *data);
static ngx_inline void ngx_http_push_stream_process_worker_message_data(ngx_http_push_stream_shm_data_t *data);
static ngx_int_t
......@@ -115,7 +115,7 @@ ngx_http_push_stream_ipc_exit_worker(ngx_cycle_t *cycle)
// will be called many times
static ngx_int_t
ngx_http_push_stream_ipc_init_worker()
ngx_http_push_stream_ipc_init_worker(void)
{
ngx_slab_pool_t *global_shpool = (ngx_slab_pool_t *) ngx_http_push_stream_global_shm_zone->shm.addr;
ngx_http_push_stream_global_shm_data_t *global_data = (ngx_http_push_stream_global_shm_data_t *) ngx_http_push_stream_global_shm_zone->data;
......@@ -327,7 +327,7 @@ ngx_http_push_stream_census_worker_subscribers(void)
ngx_shmtx_unlock(&global_shpool->mutex);
}
ngx_inline void
static ngx_inline void
ngx_http_push_stream_census_worker_subscribers_data(ngx_http_push_stream_shm_data_t *data)
{
ngx_slab_pool_t *shpool = data->shpool;
......@@ -367,7 +367,7 @@ ngx_http_push_stream_process_worker_message(void)
}
ngx_inline void
static ngx_inline void
ngx_http_push_stream_process_worker_message_data(ngx_http_push_stream_shm_data_t *data)
{
ngx_http_push_stream_worker_msg_t *worker_msg;
......
......@@ -32,7 +32,7 @@ static ngx_int_t ngx_http_push_stream_send_response_padding(ngx_http_reque
void ngx_http_push_stream_delete_channels_data(ngx_http_push_stream_shm_data_t *data);
void ngx_http_push_stream_collect_expired_messages_and_empty_channels_data(ngx_http_push_stream_shm_data_t *data, ngx_flag_t force);
void ngx_http_push_stream_free_memory_of_expired_messages_and_channels_data(ngx_http_push_stream_shm_data_t *data, ngx_flag_t force);
ngx_inline void ngx_http_push_stream_cleanup_shutting_down_worker_data(ngx_http_push_stream_shm_data_t *data);
static ngx_inline void ngx_http_push_stream_cleanup_shutting_down_worker_data(ngx_http_push_stream_shm_data_t *data);
static ngx_inline void
......@@ -61,7 +61,7 @@ ngx_http_push_stream_ensure_qtd_of_messages_locked(ngx_http_push_stream_shm_data
static void
ngx_http_push_stream_delete_channels()
ngx_http_push_stream_delete_channels(void)
{
ngx_http_push_stream_global_shm_data_t *global_data = (ngx_http_push_stream_global_shm_data_t *) ngx_http_push_stream_global_shm_zone->data;
ngx_queue_t *cur = &global_data->shm_datas_queue;
......@@ -175,7 +175,7 @@ ngx_http_push_stream_cleanup_shutting_down_worker(void)
}
ngx_inline void
static ngx_inline void
ngx_http_push_stream_cleanup_shutting_down_worker_data(ngx_http_push_stream_shm_data_t *data)
{
ngx_http_push_stream_worker_data_t *thisworker_data = data->ipc + ngx_process_slot;
......@@ -903,16 +903,15 @@ nxg_http_push_stream_free_channel_memory_locked(ngx_slab_pool_t *shpool, ngx_htt
static ngx_int_t
ngx_http_push_stream_memory_cleanup()
ngx_http_push_stream_memory_cleanup(void)
{
ngx_http_push_stream_global_shm_data_t *global_data = (ngx_http_push_stream_global_shm_data_t *) ngx_http_push_stream_global_shm_zone->data;
ngx_queue_t *cur = &global_data->shm_datas_queue;
while ((cur = ngx_queue_next(cur)) != &global_data->shm_datas_queue) {
ngx_http_push_stream_shm_data_t *data = ngx_queue_data(cur, ngx_http_push_stream_shm_data_t, shm_data_queue);
ngx_slab_pool_t *shpool = data->shpool;
ngx_http_push_stream_delete_channels(data, shpool);
ngx_http_push_stream_delete_channels_data(data);
ngx_http_push_stream_collect_expired_messages_and_empty_channels_data(data, 0);
ngx_http_push_stream_free_memory_of_expired_messages_and_channels(0);
}
......@@ -922,7 +921,7 @@ ngx_http_push_stream_memory_cleanup()
static ngx_int_t
ngx_http_push_stream_buffer_cleanup()
ngx_http_push_stream_buffer_cleanup(void)
{
ngx_http_push_stream_global_shm_data_t *global_data = (ngx_http_push_stream_global_shm_data_t *) ngx_http_push_stream_global_shm_zone->data;
ngx_queue_t *cur = &global_data->shm_datas_queue;
......
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