Skip to content

Commit

Permalink
Fixed one problem in event.c
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengshuxin committed Dec 7, 2023
1 parent 3d86688 commit bd3e8fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ GENERATE_HTML = NO
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.

HTML_OUTPUT = html
#HTML_OUTPUT = html

# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
Expand Down
8 changes: 4 additions & 4 deletions lib_acl/src/event/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,20 @@ void event_fire(ACL_EVENT *ev)

if (r_timeout > 0 && r_callback) {
fdp->r_ttl = ev->present + fdp->r_timeout;
fdp->r_callback(ACL_EVENT_RW_TIMEOUT, ev,
r_callback(ACL_EVENT_RW_TIMEOUT, ev,
fdp->stream, fdp->r_context);
}

/* ready[i] maybe been set NULL in r_callback */
if (w_timeout > 0 && w_callback && ready[i]) {
fdp->w_ttl = ev->present + fdp->w_timeout;
fdp->w_callback(ACL_EVENT_RW_TIMEOUT, ev,
w_callback(ACL_EVENT_RW_TIMEOUT, ev,
fdp->stream, fdp->w_context);
}
continue;
}

if ((type & (ACL_EVENT_READ | ACL_EVENT_ACCEPT))) {
if ((type & (ACL_EVENT_READ | ACL_EVENT_ACCEPT)) && fdp->r_callback) {
fdp->event_type &= ~(ACL_EVENT_READ | ACL_EVENT_ACCEPT);
if (fdp->r_timeout > 0)
fdp->r_ttl = ev->present + fdp->r_timeout;
Expand All @@ -178,7 +178,7 @@ void event_fire(ACL_EVENT *ev)
if (ready[i] == NULL)
continue;

if ((type & (ACL_EVENT_WRITE | ACL_EVENT_CONNECT))) {
if ((type & (ACL_EVENT_WRITE | ACL_EVENT_CONNECT)) && fdp->w_callback) {
if (fdp->w_timeout > 0)
fdp->w_ttl = ev->present + fdp->w_timeout;
fdp->event_type &= ~(ACL_EVENT_WRITE | ACL_EVENT_CONNECT);
Expand Down

0 comments on commit bd3e8fb

Please sign in to comment.