[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r16533 - gnunet-gtk/src/lib
From: |
gnunet |
Subject: |
[GNUnet-SVN] r16533 - gnunet-gtk/src/lib |
Date: |
Mon, 15 Aug 2011 14:55:55 +0200 |
Author: grothoff
Date: 2011-08-15 14:55:55 +0200 (Mon, 15 Aug 2011)
New Revision: 16533
Modified:
gnunet-gtk/src/lib/eventloop.c
Log:
some code cleanup
Modified: gnunet-gtk/src/lib/eventloop.c
===================================================================
--- gnunet-gtk/src/lib/eventloop.c 2011-08-15 12:48:31 UTC (rev 16532)
+++ gnunet-gtk/src/lib/eventloop.c 2011-08-15 12:55:55 UTC (rev 16533)
@@ -532,14 +532,14 @@
}
if (pre_ret > 0)
- {
+ {
#if DEBUG_NETWORK
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "pre_ret is %d, setting delay to 0\n",
- pre_ret);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "pre_ret is %d, setting delay to 0\n",
+ pre_ret);
#endif
- delay = 0;
- }
+ delay = 0;
+ }
#if DEBUG_NETWORK
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -560,29 +560,33 @@
* from within a task (currently we're not in a task, but in a select()
call, remember)
* Startup reason is used to pass the scheduler sanity check.
*/
- if (TRUE == g_main_context_check (ml->gmc, ml->max_priority,
&ml->cached_poll_array[fd_counter], need_gfds))
+ if (TRUE == g_main_context_check (ml->gmc,
+ ml->max_priority,
+ &ml->cached_poll_array[fd_counter],
+ need_gfds))
GNUNET_SCHEDULER_add_continuation (gnunet_gtk_dispatch_task, ml,
GNUNET_SCHEDULER_REASON_STARTUP);
#if !WINDOWS
- if (rfds)
+ if (NULL != rfds)
GNUNET_NETWORK_fdset_zero (rfds);
- if (wfds)
+ if (NULL != wfds)
GNUNET_NETWORK_fdset_zero (wfds);
- if (efds)
+ if (NULL != efds)
GNUNET_NETWORK_fdset_zero (efds);
for (i = 0; i < fd_counter; i++)
- {
- int set[3];
- if ((set[0] = FD_ISSET (ml->cached_poll_array[i].fd, &aread)))
- FD_SET (ml->cached_poll_array[i].fd, &rfds->sds);
- if ((set[1] = FD_ISSET (ml->cached_poll_array[i].fd, &awrite)))
- FD_SET (ml->cached_poll_array[i].fd, &wfds->sds);
- if ((set[2] = FD_ISSET (ml->cached_poll_array[i].fd, &aexcept)))
- FD_SET (ml->cached_poll_array[i].fd, &efds->sds);
- if (set[0] || set[1] || set[2])
- result += 1;
- }
+ {
+ int set[3];
+
+ if ((set[0] = FD_ISSET (ml->cached_poll_array[i].fd, &aread)))
+ GNUNET_NETWORK_fdset_set_native (rfds, ml->cached_poll_array[i].fd);
+ if ((set[1] = FD_ISSET (ml->cached_poll_array[i].fd, &awrite)))
+ GNUNET_NETWORK_fdset_set_native (wfds, ml->cached_poll_array[i].fd);
+ if ((set[2] = FD_ISSET (ml->cached_poll_array[i].fd, &aexcept)))
+ GNUNET_NETWORK_fdset_set_native (efds, ml->cached_poll_array[i].fd);
+ if (set[0] || set[1] || set[2])
+ result++;
+ }
#else
if (socks > 0)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r16533 - gnunet-gtk/src/lib,
gnunet <=