@@ -17,7 +17,7 @@ static ngx_int_t ngx_http_lua_epoll_clear_event(ngx_event_t *ev,
17
17
static ngx_int_t ngx_http_lua_epoll_process_event (ngx_http_request_t * r ,
18
18
ngx_msec_t timer );
19
19
20
- static int ep = -1 ;
20
+ static int epoll_created = -1 ;
21
21
22
22
ngx_http_lua_event_actions_t ngx_http_lua_epoll = {
23
23
ngx_http_lua_epoll_init_event ,
@@ -30,9 +30,9 @@ ngx_http_lua_event_actions_t ngx_http_lua_epoll = {
30
30
static ngx_int_t
31
31
ngx_http_lua_epoll_init_event (ngx_cycle_t * cycle )
32
32
{
33
- ep = epoll_create (1 );
33
+ epoll_created = epoll_create (1 );
34
34
35
- if (ep == -1 ) {
35
+ if (epoll_created == -1 ) {
36
36
ngx_log_error (NGX_LOG_EMERG , cycle -> log , ngx_errno ,
37
37
"lua epoll_create() failed" );
38
38
@@ -82,7 +82,7 @@ ngx_http_lua_epoll_set_event(ngx_event_t *ev, ngx_int_t event)
82
82
ee .events = events ;
83
83
ee .data .ptr = c ;
84
84
85
- if (epoll_ctl (ep , op , c -> fd , & ee ) == -1 ) {
85
+ if (epoll_ctl (epoll_created , op , c -> fd , & ee ) == -1 ) {
86
86
ngx_log_error (NGX_LOG_ALERT , ev -> log , ngx_errno ,
87
87
"lua epoll_ctl(EPOLL_CTL_ADD, %d) failed, add event: %d" ,
88
88
c -> fd , events );
@@ -127,7 +127,7 @@ ngx_http_lua_epoll_clear_event(ngx_event_t *ev, ngx_int_t event)
127
127
ee .data .ptr = NULL ;
128
128
}
129
129
130
- if (epoll_ctl (ep , op , c -> fd , & ee ) == -1 ) {
130
+ if (epoll_ctl (epoll_created , op , c -> fd , & ee ) == -1 ) {
131
131
ngx_log_error (NGX_LOG_ALERT , ev -> log , ngx_errno ,
132
132
"lua epoll_ctl(EPOLL_CTL_DEL, %d) failed" , c -> fd );
133
133
@@ -150,7 +150,7 @@ ngx_http_lua_epoll_process_event(ngx_http_request_t *r, ngx_msec_t timer)
150
150
ngx_connection_t * c ;
151
151
struct epoll_event ee ;
152
152
153
- events = epoll_wait (ep , & ee , 1 , timer );
153
+ events = epoll_wait (epoll_created , & ee , 1 , timer );
154
154
155
155
err = (events == -1 ) ? ngx_errno : 0 ;
156
156
0 commit comments