aboutsummaryrefslogtreecommitdiff
path: root/src/event/ngx_event.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/ngx_event.h')
-rw-r--r--src/event/ngx_event.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h
index 5a545504e..04da4d38e 100644
--- a/src/event/ngx_event.h
+++ b/src/event/ngx_event.h
@@ -20,6 +20,14 @@ typedef struct {
#endif
+typedef enum {
+ NGX_ERROR_CRIT = 0,
+ NGX_ERROR_ERR,
+ NGX_ERROR_INFO,
+ NGX_ERROR_IGNORE_ECONNRESET
+} ngx_event_log_error_e;
+
+
struct ngx_event_s {
void *data;
/* TODO rename to handler */
@@ -36,8 +44,8 @@ struct ngx_event_s {
/*
* The inline of "ngx_rbtree_t rbtree;".
*
- * It allows to pack the rbtree_color and the variuos event bit flags into
- * the single "int". We also use "unsigned char" and then "usigned short"
+ * It allows to pack the rbtree_color and the various event bit flags into
+ * the single "int". We also use "unsigned char" and then "unsigned short"
* because otherwise MSVC 6.0 uses an additional "int" for the bit flags.
* We use "char rbtree_color" instead of "unsigned int rbtree_color:1"
* because it preserves the bits order on the big endian platforms.
@@ -62,14 +70,16 @@ struct ngx_event_s {
*/
unsigned char active:1;
+ unsigned char disabled:1;
+
/* the ready event; in aio mode 0 means that no operation can be posted */
unsigned char ready:1;
/* aio operation is complete */
unsigned char complete:1;
- unsigned char eof:1;
- unsigned char error:1;
+ unsigned short eof:1;
+ unsigned short error:1;
unsigned short timedout:1;
unsigned short timer_set:1;
@@ -78,7 +88,7 @@ struct ngx_event_s {
unsigned short read_discarded:1;
- unsigned short ignore_econnreset:1;
+ unsigned short log_error:2; /* ngx_event_log_error_e */
unsigned short unexpected_eof:1;
unsigned short deferred_accept:1;
@@ -371,6 +381,9 @@ int ngx_event_post_acceptex(ngx_listening_t *ls, int n);
#endif
+/* used in ngx_log_debugX() */
+#define ngx_event_ident(p) ((ngx_connection_t *) (p))->fd
+
#include <ngx_event_timer.h>