gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r38000 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r38000 - gnunet/src/util
Date: Sat, 24 Sep 2016 13:58:19 +0200

Author: grothoff
Date: 2016-09-24 13:58:19 +0200 (Sat, 24 Sep 2016)
New Revision: 38000

Modified:
   gnunet/src/util/service_new.c
Log:
handle case of missing handler properly

Modified: gnunet/src/util/service_new.c
===================================================================
--- gnunet/src/util/service_new.c       2016-09-24 01:19:18 UTC (rev 37999)
+++ gnunet/src/util/service_new.c       2016-09-24 11:58:19 UTC (rev 38000)
@@ -269,7 +269,7 @@
    * Pointer to the message to be transmitted by @e send_task.
    */
   const struct GNUNET_MessageHeader *msg;
-  
+
   /**
    * User context value, value returned from
    * the connect callback.
@@ -286,7 +286,7 @@
    * Current position in @e msg at which we are transmitting.
    */
   size_t msg_pos;
-  
+
   /**
    * Persist the file handle for this client no matter what happens,
    * force the OS to close once the process actually dies.  Should only
@@ -1234,7 +1234,7 @@
   {
     /* listen only on inherited sockets if we have any */
     struct GNUNET_NETWORK_Handle **ls;
-    
+
     for (ls = lsocks; NULL != *ls; ls++)
     {
       struct ServiceListenContext *slc;
@@ -1694,7 +1694,7 @@
         clock_offset);
   }
   GNUNET_RESOLVER_connect (sh.cfg);
-  
+
   /* actually run service */
   err = 0;
   GNUNET_SCHEDULER_run (&service_main,
@@ -1908,7 +1908,13 @@
 
   if ( (GNUNET_MQ_ERROR_NO_MATCH == error) &&
        (GNUNET_NO == sh->require_found) )
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "No handler for message of type %u found\n",
+                (unsigned int) client->warn_type);
+    GNUNET_SERVICE_client_continue (client);
     return; /* ignore error */
+  }
   GNUNET_SERVICE_client_drop (client);
 }
 
@@ -1924,7 +1930,7 @@
   struct GNUNET_SERVICE_Client *client = cls;
 
   GNUNET_break (0 != client->warn_type); /* type should never be 0 here, as we 
don't use 0 */
-  client->warn_task 
+  client->warn_task
     = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
                                     &warn_no_client_continue,
                                    client);
@@ -2138,7 +2144,7 @@
     struct sockaddr_storage sa;
     socklen_t addrlen;
     int ok;
-    
+
     addrlen = sizeof (sa);
     sock = GNUNET_NETWORK_socket_accept (slc->listen_socket,
                                         (struct sockaddr *) &sa,
@@ -2259,7 +2265,7 @@
     = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL,
                                     c->sock,
                                     &service_client_recv,
-                                    c);  
+                                    c);
 }
 
 




reply via email to

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