mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-30 13:34:57 +08:00
control: Cannot write with hangup
This commit is contained in:
parent
f322b5a1ae
commit
a75ffaa08d
@ -193,11 +193,10 @@ control_handle_data(void *arg, unsigned short events)
|
||||
{
|
||||
struct fd_list *fd = arg;
|
||||
|
||||
if (events != ELE_READ && events != ELE_WRITE &&
|
||||
events != (ELE_READ | ELE_WRITE))
|
||||
if (!(events & (ELE_READ | ELE_WRITE)))
|
||||
logerrx("%s: unexpected event 0x%04x", __func__, events);
|
||||
|
||||
if (events & ELE_WRITE)
|
||||
if (events & ELE_WRITE && !(events & ELE_HANGUP))
|
||||
control_handle_write(fd);
|
||||
if (events & ELE_READ)
|
||||
control_handle_read(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user