diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -48,7 +48,7 @@ int handle_new_connection(int sfd, struct pollfd *fds, nfds_t *nfds, // process message to all the connected clients. // returns 0 on success and -1 on failure. // TODO: add struct client *clients -int process_message(struct pollfd *fds, nfds_t *nfds) { +int process_message(struct pollfd *fds, nfds_t *nfds, struct client *clients) { for (nfds_t i = 1; i < *nfds; i++) { /* if client has something to say */ if (fds[i].revents & POLLIN) { @@ -112,7 +112,7 @@ int main() { continue; } } - if (process_message(fds, &nfds) == -1) { + if (process_message(fds, &nfds, clients) == -1) { perror("could not process message"); continue; } |
