Mercurial > hg > nginx
comparison src/event/modules/ngx_poll_module.c @ 96:a23d010f356d
nginx-0.0.1-2003-05-27-16:18:54 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 27 May 2003 12:18:54 +0000 |
parents | 19cc647ecd91 |
children | 7e86d028d8f0 |
comparison
equal
deleted
inserted
replaced
95:b48066122884 | 96:a23d010f356d |
---|---|
25 | 25 |
26 | 26 |
27 static ngx_str_t poll_name = ngx_string("poll"); | 27 static ngx_str_t poll_name = ngx_string("poll"); |
28 | 28 |
29 ngx_event_module_t ngx_poll_module_ctx = { | 29 ngx_event_module_t ngx_poll_module_ctx = { |
30 NGX_EVENT_MODULE, | |
31 &poll_name, | 30 &poll_name, |
32 NULL, /* create configuration */ | 31 NULL, /* create configuration */ |
33 NULL, /* init configuration */ | 32 NULL, /* init configuration */ |
34 | 33 |
35 { | 34 { |
45 } | 44 } |
46 | 45 |
47 }; | 46 }; |
48 | 47 |
49 ngx_module_t ngx_poll_module = { | 48 ngx_module_t ngx_poll_module = { |
49 NGX_MODULE, | |
50 &ngx_poll_module_ctx, /* module context */ | 50 &ngx_poll_module_ctx, /* module context */ |
51 0, /* module index */ | |
52 NULL, /* module directives */ | 51 NULL, /* module directives */ |
53 NGX_EVENT_MODULE_TYPE, /* module type */ | 52 NGX_EVENT_MODULE, /* module type */ |
54 NULL /* init module */ | 53 NULL /* init module */ |
55 }; | 54 }; |
56 | 55 |
57 | 56 |
58 | 57 |
59 static int ngx_poll_init(ngx_log_t *log) | 58 static int ngx_poll_init(ngx_log_t *log) |
60 { | 59 { |
61 ngx_event_conf_t *ecf; | 60 ngx_event_conf_t *ecf; |
62 | 61 |
63 ecf = ngx_event_get_conf(ngx_event_module_ctx); | 62 ecf = ngx_event_get_conf(ngx_event_module); |
64 | 63 |
65 ngx_test_null(event_list, | 64 ngx_test_null(event_list, |
66 ngx_alloc(sizeof(struct pollfd) * ecf->connections, log), | 65 ngx_alloc(sizeof(struct pollfd) * ecf->connections, log), |
67 NGX_ERROR); | 66 NGX_ERROR); |
68 | 67 |