diff options
author | Aki <please@ignore.pl> | 2021-08-15 19:21:49 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-08-15 19:21:49 +0200 |
commit | 906eb598f150931e821446e9dcf022ea9052ab36 (patch) | |
tree | 5e0d5c24c817ef12437c3705b5844d205c78bce4 /plop.c | |
parent | 742b94fbd5756551ab5cd6f2ac1799dfbc7f5152 (diff) | |
download | plop-906eb598f150931e821446e9dcf022ea9052ab36.zip plop-906eb598f150931e821446e9dcf022ea9052ab36.tar.gz plop-906eb598f150931e821446e9dcf022ea9052ab36.tar.bz2 |
Removed epoll file descriptor from server handler
Diffstat (limited to 'plop.c')
-rw-r--r-- | plop.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -195,10 +195,9 @@ int plop_handle_client(struct connection * c) } /// Accepts awaiting connections if any. -/// \param efd File descriptor for epoll's context /// \param server File descriptor for server socket /// \return -1 if an error occured -int plop_handle_server(const int efd, const int server) +int plop_handle_server(const int server) { struct epoll_event e; e.events = EPOLLIN | EPOLLOUT; // TODO: Add EPOLLHUP? @@ -255,7 +254,7 @@ int plop_handle_server(const int efd, const int server) connection->push = 1; e.data.ptr = connection; - if (-1 == epoll_ctl(efd, EPOLL_CTL_ADD, client, &e)) + if (-1 == epoll_ctl(plop.efd, EPOLL_CTL_ADD, client, &e)) { return -1; } |