Skip to content
Snippets Groups Projects
Commit 73881115 authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Fixed wrong FD_COPY usage.

Actual macro has dest and src switched.

Change-Id: I4a8e0f32fb85f4efece0b325c8ceea22cf1b42aa
parent 8d1f0569
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@
/* FD_COPY macro compat. */
#ifndef FD_COPY
#define FD_COPY(dest,src) memcpy((dest), (src), sizeof(fd_set))
#define FD_COPY(src, dest) memcpy((dest), (src), sizeof(fd_set))
#endif
/* Mirror mode (no answering). */
......@@ -623,7 +623,7 @@ int udp_reader(iohandler_t *h, dthread_t *thread)
/* Wait for events. */
fd_set rfds;
FD_COPY(&rfds, &fds);
FD_COPY(&fds, &rfds);
int nfds = select(maxfd + 1, &rfds, NULL, NULL, NULL);
if (nfds <= 0) {
if (errno == EINTR) continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment