Permalink
Browse files

too many files!!!

  • Loading branch information...
1 parent 2cb7b22 commit b372418166b40cffbc1a990a2115b3502ff7cc8b @slact slact committed Jan 28, 2010
Showing with 6 additions and 6 deletions.
  1. +3 −3 src/ngx_http_push_module_ipc.c
  2. +3 −3 src/ngx_http_push_module_setup.c
@@ -72,8 +72,8 @@ static ngx_int_t ngx_http_push_init_ipc(ngx_cycle_t *cycle, ngx_int_t workers) {
return NGX_OK;
}
-static void ngx_http_push_ipc_exit_process(ngx_cycle_t *cycle) {
- ngx_close_channel(&ngx_http_push_socketpairs[ngx_process_slot], cycle->log);
+static void ngx_http_push_ipc_exit_worker(ngx_cycle_t *cycle) {
+ ngx_close_channel((ngx_socket_t *) ngx_http_push_socketpairs[ngx_process_slot], cycle->log);
ngx_http_push_socketpairs[ngx_process_slot][0] = NGX_INVALID_FILE;
ngx_http_push_socketpairs[ngx_process_slot][1] = NGX_INVALID_FILE;
}
@@ -150,7 +150,7 @@ static void ngx_http_push_channel_handler(ngx_event_t *ev) {
static ngx_int_t ngx_http_push_alert_worker(ngx_pid_t pid, ngx_int_t slot, ngx_log_t *log) {
//seems ch doesn't need to have fd set. odd, but roll with it. pid and process slot also unnecessary.
static ngx_channel_t ch = {NGX_CMD_HTTP_PUSH_CHECK_MESSAGES, 0, 0, -1};
- return ngx_write_channel(ngx_http_push_socketpairs[2*slot], &ch, sizeof(ngx_channel_t), log);
+ return ngx_write_channel(ngx_http_push_socketpairs[slot][0], &ch, sizeof(ngx_channel_t), log);
}
static ngx_inline void ngx_http_push_process_worker_message(void) {
@@ -228,7 +228,7 @@ static void ngx_http_push_exit_master(ngx_cycle_t *cycle) {
ngx_http_push_walk_rbtree(ngx_http_push_movezig_channel_locked);
}
-static void ngx_http_push_exit_worker(ngx_cycle *cycle) {
+static void ngx_http_push_exit_worker(ngx_cycle_t *cycle) {
ngx_http_push_ipc_exit_worker(cycle);
}
@@ -377,7 +377,7 @@ ngx_module_t ngx_http_push_module = {
ngx_http_push_init_worker, /* init process */
NULL, /* init thread */
NULL, /* exit thread */
- ngx_http_push_exit_process, /* exit process */
- NULL, /* exit master */
+ ngx_http_push_exit_worker, /* exit process */
+ ngx_http_push_exit_master, /* exit master */
NGX_MODULE_V1_PADDING
};

0 comments on commit b372418

Please sign in to comment.