diff src/event/modules/ngx_eventport_module.c @ 326:f70f2f565fe0 NGINX_0_5_33

nginx 0.5.33 *) Change: now by default the "echo" SSI command uses entity encoding. *) Feature: the "encoding" parameter in the "echo" SSI command. *) Change: mail proxy was split on three modules: pop3, imap and smtp. *) Feature: the --without-mail_pop3_module, --without-mail_imap_module, and --without-mail_smtp_module configuration parameters. *) Feature: the "smtp_greeting_delay" and "smtp_client_buffer" directives of the ngx_mail_smtp_module. *) Feature: the "server_name" and "valid_referers" directives support regular expressions. *) Feature: the "server_name", "map", and "valid_referers" directives support the "www.example.*" wildcards. *) Bugfix: sub_filter did not work with empty substitution. *) Bugfix: in sub_filter parsing. *) Bugfix: a worker process may got caught in an endless loop, if the memcached was used. *) Bugfix: nginx supported low case only "close" and "keep-alive" values in the "Connection" request header line; bug appeared in 0.5.32. *) Bugfix: nginx could not start on Solaris if the shared PCRE library located in non-standard place was used.
author Igor Sysoev <http://sysoev.ru>
date Wed, 07 Nov 2007 00:00:00 +0300
parents 24def6198d7f
children 2eea67ed0bc2
line wrap: on
line diff
--- a/src/event/modules/ngx_eventport_module.c
+++ b/src/event/modules/ngx_eventport_module.c
@@ -40,9 +40,9 @@ typedef struct  port_notify {
     void       *portnfy_user;   /* user defined */
 } port_notify_t;
 
-typedef struct itimerspec {         /* definition per POSIX.4 */
-    struct timespec it_interval;    /* timer period */
-    struct timespec it_value;       /* timer expiration */
+typedef struct itimerspec {     /* definition per POSIX.4 */
+    struct timespec it_interval;/* timer period */
+    struct timespec it_value;   /* timer expiration */
 } itimerspec_t;
 
 int port_create(void)
@@ -87,16 +87,16 @@ int timer_delete(timer_t timerid)
 
 
 typedef struct {
-    u_int  events;
+    ngx_uint_t  events;
 } ngx_eventport_conf_t;
 
 
 static ngx_int_t ngx_eventport_init(ngx_cycle_t *cycle, ngx_msec_t timer);
 static void ngx_eventport_done(ngx_cycle_t *cycle);
-static ngx_int_t ngx_eventport_add_event(ngx_event_t *ev, int event,
-    u_int flags);
-static ngx_int_t ngx_eventport_del_event(ngx_event_t *ev, int event,
-    u_int flags);
+static ngx_int_t ngx_eventport_add_event(ngx_event_t *ev, ngx_int_t event,
+    ngx_uint_t flags);
+static ngx_int_t ngx_eventport_del_event(ngx_event_t *ev, ngx_int_t event,
+    ngx_uint_t flags);
 static ngx_int_t ngx_eventport_process_events(ngx_cycle_t *cycle,
     ngx_msec_t timer, ngx_uint_t flags);
 
@@ -105,7 +105,7 @@ static char *ngx_eventport_init_conf(ngx
 
 static int            ep = -1;
 static port_event_t  *event_list;
-static u_int          nevents;
+static ngx_uint_t     nevents;
 static timer_t        event_timer = -1;
 
 static ngx_str_t      eventport_name = ngx_string("eventport");
@@ -261,9 +261,9 @@ ngx_eventport_done(ngx_cycle_t *cycle)
 
 
 static ngx_int_t
-ngx_eventport_add_event(ngx_event_t *ev, int event, u_int flags)
+ngx_eventport_add_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
 {
-    int                events, prev;
+    ngx_int_t          events, prev;
     ngx_event_t       *e;
     ngx_connection_t  *c;
 
@@ -291,7 +291,7 @@ ngx_eventport_add_event(ngx_event_t *ev,
     }
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
-                   "eventport add event: fd:%d ev:%04Xd", c->fd, events);
+                   "eventport add event: fd:%d ev:%04Xi", c->fd, events);
 
     if (port_associate(ep, PORT_SOURCE_FD, c->fd, events,
                        (void *) ((uintptr_t) ev | ev->instance))
@@ -310,7 +310,7 @@ ngx_eventport_add_event(ngx_event_t *ev,
 
 
 static ngx_int_t
-ngx_eventport_del_event(ngx_event_t *ev, int event, u_int flags)
+ngx_eventport_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
 {
     ngx_event_t       *e;
     ngx_connection_t  *c;
@@ -340,7 +340,7 @@ ngx_eventport_del_event(ngx_event_t *ev,
 
     if (e->oneshot) {
         ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
-                       "eventport change event: fd:%d ev:%04Xd", c->fd, event);
+                       "eventport change event: fd:%d ev:%04Xi", c->fd, event);
 
         if (port_associate(ep, PORT_SOURCE_FD, c->fd, event,
                            (void *) ((uintptr_t) ev | ev->instance))
@@ -396,7 +396,7 @@ ngx_eventport_process_events(ngx_cycle_t
 
     events = 1;
 
-    n = port_getn(ep, event_list, nevents, &events, tp);
+    n = port_getn(ep, event_list, (u_int) nevents, &events, tp);
 
     err = ngx_errno;