Prevent redundant test of I/O event readiness for any given file descriptor in patty_ax25_next_event()
This commit is contained in:
parent
53791bf21d
commit
a2b21eb848
1 changed files with 6 additions and 0 deletions
|
@ -210,6 +210,8 @@ int patty_ax25_next_event(patty_ax25 *ax25, patty_ax25_event *ev) {
|
||||||
ev->type = PATTY_AX25_EVENT_RECV;
|
ev->type = PATTY_AX25_EVENT_RECV;
|
||||||
ev->fd = fd;
|
ev->fd = fd;
|
||||||
|
|
||||||
|
FD_CLR(fd, &ax25->unix_fds_pending_read);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,6 +219,8 @@ int patty_ax25_next_event(patty_ax25 *ax25, patty_ax25_event *ev) {
|
||||||
ev->type = PATTY_AX25_EVENT_SEND;
|
ev->type = PATTY_AX25_EVENT_SEND;
|
||||||
ev->fd = fd;
|
ev->fd = fd;
|
||||||
|
|
||||||
|
FD_CLR(fd, &ax25->unix_fds_pending_write);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,6 +228,8 @@ int patty_ax25_next_event(patty_ax25 *ax25, patty_ax25_event *ev) {
|
||||||
ev->type = PATTY_AX25_EVENT_ERROR;
|
ev->type = PATTY_AX25_EVENT_ERROR;
|
||||||
ev->fd = fd;
|
ev->fd = fd;
|
||||||
|
|
||||||
|
FD_CLR(fd, &ax25->unix_fds_pending_error);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue