gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r21591 - in gnunet/src: ats fs include


From: gnunet
Subject: [GNUnet-SVN] r21591 - in gnunet/src: ats fs include
Date: Sun, 27 May 2012 19:41:52 +0200

Author: grothoff
Date: 2012-05-27 19:41:52 +0200 (Sun, 27 May 2012)
New Revision: 21591

Modified:
   gnunet/src/ats/ats_api_scheduling.c
   gnunet/src/fs/fs_search.c
   gnunet/src/include/gnunet_ats_service.h
   gnunet/src/include/gnunet_transport_plugin.h
Log:
-fix #2378

Modified: gnunet/src/ats/ats_api_scheduling.c
===================================================================
--- gnunet/src/ats/ats_api_scheduling.c 2012-05-27 16:52:17 UTC (rev 21590)
+++ gnunet/src/ats/ats_api_scheduling.c 2012-05-27 17:41:52 UTC (rev 21591)
@@ -145,7 +145,6 @@
    */
   struct ATS_Network * net_tail;
 
-
   /**
    * Array of session objects (we need to translate them to numbers and back
    * for the protocol; the offset in the array is the session number on the
@@ -162,7 +161,6 @@
   /**
    * Task retrieving interfaces from the system
    */
-
   GNUNET_SCHEDULER_TaskIdentifier interface_task;
 
 
@@ -619,10 +617,10 @@
   do_transmit (sh);
 }
 
+
 /**
  * delete the current network list
  */
-
 static void
 delete_networks (struct GNUNET_ATS_SchedulingHandle *sh)
 {
@@ -735,7 +733,6 @@
 }
 
 
-
 /**
  * Periodically get list of addresses
  * @param cls closure
@@ -753,14 +750,15 @@
                                                      sh);
 }
 
+
 /**
  * Returns where the address is located: LAN or WAN or ...
+ *
  * @param sh the scheduling handle
  * @param addr address
  * @param addrlen address length
  * @return location as GNUNET_ATS_Information
  */
-
 struct GNUNET_ATS_Information
 GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle * sh, const 
struct sockaddr * addr, socklen_t addrlen)
 {
@@ -852,6 +850,7 @@
   return (const struct GNUNET_ATS_Information) ats;
 }
 
+
 /**
  * Initialize the ATS subsystem.
  *
@@ -959,6 +958,8 @@
   struct PendingMessage *p;
   struct RequestAddressMessage *m;
 
+  // FIXME: ATS needs to remember this in case of
+  // a disconnect!
   p = GNUNET_malloc (sizeof (struct PendingMessage) +
                      sizeof (struct RequestAddressMessage));
   p->size = sizeof (struct RequestAddressMessage);
@@ -999,6 +1000,7 @@
   do_transmit (sh);
 }
 
+
 /**
  * We have updated performance statistics for a given address.  Note
  * that this function can be called for addresses that are currently
@@ -1123,10 +1125,10 @@
   memcpy (pm, address->address, address->address_length);
   memcpy (&pm[address->address_length], address->transport_name, namelen);
   GNUNET_CONTAINER_DLL_insert_tail (sh->pending_head, sh->pending_tail, p);
-
   do_transmit (sh);
 }
 
+
 /**
  * A session got destroyed, stop including it as a valid address.
  *

Modified: gnunet/src/fs/fs_search.c
===================================================================
--- gnunet/src/fs/fs_search.c   2012-05-27 16:52:17 UTC (rev 21590)
+++ gnunet/src/fs/fs_search.c   2012-05-27 17:41:52 UTC (rev 21591)
@@ -1583,7 +1583,7 @@
   GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
                                          &search_result_free, sc);
   GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map);
-  if (NULL == sc->requests)
+  if (NULL != sc->requests)
   {
     GNUNET_assert (GNUNET_FS_uri_test_ksk (sc->uri));
     for (i = 0; i < sc->uri->data.ksk.keywordCount; i++)

Modified: gnunet/src/include/gnunet_ats_service.h
===================================================================
--- gnunet/src/include/gnunet_ats_service.h     2012-05-27 16:52:17 UTC (rev 
21590)
+++ gnunet/src/include/gnunet_ats_service.h     2012-05-27 17:41:52 UTC (rev 
21591)
@@ -605,6 +605,7 @@
                            const struct GNUNET_HELLO_Address *address,
                            struct Session *session, int in_use);
 
+
 /**
  * A session got destroyed, stop including it as a valid address.
  *

Modified: gnunet/src/include/gnunet_transport_plugin.h
===================================================================
--- gnunet/src/include/gnunet_transport_plugin.h        2012-05-27 16:52:17 UTC 
(rev 21590)
+++ gnunet/src/include/gnunet_transport_plugin.h        2012-05-27 17:41:52 UTC 
(rev 21591)
@@ -313,11 +313,12 @@
  *         and does NOT mean that the message was not transmitted (DV)
  */
 typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunction) (void *cls,
-    struct Session *session,
-    const char *msgbuf, size_t msgbuf_size,
-    unsigned int priority,
-    struct GNUNET_TIME_Relative to,
-    GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls);
+                                                     struct Session *session,
+                                                     const char *msgbuf, 
size_t msgbuf_size,
+                                                     unsigned int priority,
+                                                     struct 
GNUNET_TIME_Relative to,
+                                                     
GNUNET_TRANSPORT_TransmitContinuation cont,
+                                                     void *cont_cls);
 
 
 /**




reply via email to

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