gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated (cc5bb40d1 -> 1c09b2424)


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated (cc5bb40d1 -> 1c09b2424)
Date: Sat, 06 Jan 2018 18:35:46 +0100

This is an automated email from the git hooks/post-receive script.

lurchi pushed a change to branch master
in repository gnunet.

    from cc5bb40d1 add ABE dependencies to documentation
     new 201a67be1 fix dereferencing uninitialized pointer
     new 1c09b2424 fix documentation

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/include/gnunet_network_lib.h |  2 +-
 src/util/scheduler.c             | 13 ++++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h
index 9e692bbbf..2c344749f 100644
--- a/src/include/gnunet_network_lib.h
+++ b/src/include/gnunet_network_lib.h
@@ -53,7 +53,7 @@ struct GNUNET_NETWORK_FDSet
 {
 
   /**
-   * Maximum number of any socket socket descriptor in the set (plus one)
+   * Maximum number of any socket descriptor in the set (plus one)
    */
   int nsds;
 
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index fecbc0de5..2912dd78b 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -756,8 +756,8 @@ init_fd_info (struct GNUNET_SCHEDULER_Task *t,
     t->fds = fdi;
     if (1 == read_nh_len)
     {
+      GNUNET_assert (NULL != read_nh);
       fdi->fd = *read_nh;
-      GNUNET_assert (NULL != fdi->fd);
       fdi->et = GNUNET_SCHEDULER_ET_IN;
       fdi->sock = GNUNET_NETWORK_get_fd (*read_nh);
       t->read_fd = fdi->sock;
@@ -765,8 +765,8 @@ init_fd_info (struct GNUNET_SCHEDULER_Task *t,
     }
     else if (1 == write_nh_len)
     {
+      GNUNET_assert (NULL != write_nh);
       fdi->fd = *write_nh;
-      GNUNET_assert (NULL != fdi->fd);
       fdi->et = GNUNET_SCHEDULER_ET_OUT;
       fdi->sock = GNUNET_NETWORK_get_fd (*write_nh);
       t->read_fd = -1;
@@ -774,8 +774,8 @@ init_fd_info (struct GNUNET_SCHEDULER_Task *t,
     }
     else if (1 == read_fh_len)
     {
+      GNUNET_assert (NULL != read_fh);
       fdi->fh = *read_fh;
-      GNUNET_assert (NULL != fdi->fh);
       fdi->et = GNUNET_SCHEDULER_ET_IN;
       fdi->sock = (*read_fh)->fd; // FIXME: does not work under WIN32
       t->read_fd = fdi->sock;
@@ -783,8 +783,8 @@ init_fd_info (struct GNUNET_SCHEDULER_Task *t,
     }
     else
     {
+      GNUNET_assert (NULL != write_fh);
       fdi->fh = *write_fh;
-      GNUNET_assert (NULL != fdi->fh);
       fdi->et = GNUNET_SCHEDULER_ET_OUT;
       fdi->sock = (*write_fh)->fd; // FIXME: does not work under WIN32
       t->read_fd = -1;
@@ -1750,8 +1750,11 @@ GNUNET_SCHEDULER_add_select (enum 
GNUNET_SCHEDULER_Priority prio,
   const struct GNUNET_DISK_FileHandle **write_fhandles;
   unsigned int read_nhandles_len, write_nhandles_len,
                read_fhandles_len, write_fhandles_len;
+  int no_fdsets = (NULL == rs) && (NULL == ws);
+  int no_socket_descriptors =
+    ((NULL != rs) && (0 == rs->nsds)) && ((NULL != ws) && (0 == ws->nsds));
 
-  if (((NULL == rs) && (NULL == ws)) || ((0 == rs->nsds) && (0 == ws->nsds)))
+  if (no_fdsets || no_socket_descriptors)
     return GNUNET_SCHEDULER_add_delayed_with_priority (delay,
                                                        prio,
                                                        task,

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]