gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r10102 - in gnunet/src: core fs topology


From: gnunet
Subject: [GNUnet-SVN] r10102 - in gnunet/src: core fs topology
Date: Thu, 21 Jan 2010 15:58:56 +0100

Author: grothoff
Date: 2010-01-21 15:58:56 +0100 (Thu, 21 Jan 2010)
New Revision: 10102

Modified:
   gnunet/src/core/core_api_peer_get_info.c
   gnunet/src/fs/gnunet-service-fs.c
   gnunet/src/topology/gnunet-daemon-topology.c
Log:
fix compile errors

Modified: gnunet/src/core/core_api_peer_get_info.c
===================================================================
--- gnunet/src/core/core_api_peer_get_info.c    2010-01-21 14:52:11 UTC (rev 
10101)
+++ gnunet/src/core/core_api_peer_get_info.c    2010-01-21 14:58:56 UTC (rev 
10102)
@@ -20,7 +20,7 @@
 
 /**
  * @file core/core_api_peer_get_info.c
- * @brief implementation of the peer_get_info functions 
+ * @brief implementation of the peer_change_preference functions 
  * @author Christian Grothoff
  */
 #include "platform.h"
@@ -167,7 +167,7 @@
  * @param irc context returned by the original GNUNET_CORE_peer_get_info call
  */
 void
-GNUNET_CORE_peer_get_info_cancel (struct GNUNET_CORE_InformationRequestContext 
*irc)
+GNUNET_CORE_peer_change_preference_cancel (struct 
GNUNET_CORE_InformationRequestContext *irc)
 {
   GNUNET_CLIENT_disconnect (irc->client);
   GNUNET_free (irc);

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2010-01-21 14:52:11 UTC (rev 10101)
+++ gnunet/src/fs/gnunet-service-fs.c   2010-01-21 14:58:56 UTC (rev 10102)
@@ -417,7 +417,7 @@
   struct GNUNET_CONTAINER_BloomFilter *bf;
 
   /**
-   * Context of our GNUNET_CORE_peer_get_info call.
+   * Context of our GNUNET_CORE_peer_change_preference call.
    */
   struct GNUNET_CORE_InformationRequestContext *irc;
 
@@ -1770,8 +1770,6 @@
  *
  * @param cls the requests "struct PendingRequest*"
  * @param peer identifies the peer
- * @param latency current latency estimate, "FOREVER" if we have been
- *                disconnected
  * @param bpm_in set to the current bandwidth limit (receiving) for this peer
  * @param bpm_out set to the current bandwidth limit (sending) for this peer
  * @param amount set to the amount that was actually reserved or unreserved
@@ -1783,9 +1781,8 @@
                       GNUNET_PeerIdentity * peer,
                       unsigned int bpm_in,
                       unsigned int bpm_out,
-                      struct GNUNET_TIME_Relative
-                      latency, int amount,
-                      unsigned long long preference)
+                      int amount,
+                      uint64_t preference)
 {
   struct PendingRequest *pr = cls;
   uint32_t priority;
@@ -1872,7 +1869,7 @@
     }
   /* (2) reserve reply bandwidth */
   GNUNET_assert (NULL == pr->irc);
-  pr->irc = GNUNET_CORE_peer_get_info (sched, cfg,
+  pr->irc = GNUNET_CORE_peer_change_preference (sched, cfg,
                                       &psc.target,
                                       GNUNET_CONSTANTS_SERVICE_TIMEOUT, 
                                       -1,
@@ -2222,7 +2219,7 @@
   // also, what does the return value mean?
   if (pr->irc != NULL)
     {
-      GNUNET_CORE_peer_get_info_cancel (pr->irc);
+      GNUNET_CORE_peer_change_preference_cancel (pr->irc);
       pr->irc = NULL;
     }
   if (pr->client == NULL)
@@ -2407,11 +2404,15 @@
  *
  * @param cls closure, not used
  * @param peer peer identity this notification is about
+ * @param latency reported latency of the connection with 'other'
+ * @param distance reported distance (DV) to 'other' 
  */
 static void 
 peer_connect_handler (void *cls,
                      const struct
-                     GNUNET_PeerIdentity * peer)
+                     GNUNET_PeerIdentity * peer,
+                     struct GNUNET_TIME_Relative latency,
+                     uint32_t distance)
 {
   struct ConnectedPeer *cp;
 
@@ -2773,13 +2774,17 @@
  * @param other the other peer involved (sender or receiver, NULL
  *        for loopback messages where we are both sender and receiver)
  * @param message the actual message
+ * @param latency reported latency of the connection with 'other'
+ * @param distance reported distance (DV) to 'other' 
  * @return GNUNET_OK to keep the connection open,
  *         GNUNET_SYSERR to close it (signal serious error)
  */
 static int
 handle_p2p_get (void *cls,
                const struct GNUNET_PeerIdentity *other,
-               const struct GNUNET_MessageHeader *message)
+               const struct GNUNET_MessageHeader *message,
+                                 struct GNUNET_TIME_Relative latency,
+                                 uint32_t distance)
 {
   uint16_t msize;
   const struct GetMessage *gm;
@@ -2923,10 +2928,10 @@
   if (preference < QUERY_BANDWIDTH_VALUE)
     preference = QUERY_BANDWIDTH_VALUE;
   // FIXME: also reserve bandwidth for reply?
-  (void) GNUNET_CORE_peer_get_info (sched, cfg,
-                                   other,
-                                   GNUNET_TIME_UNIT_FOREVER_REL,
-                                   0, 0, preference, NULL, NULL);
+  (void) GNUNET_CORE_peer_change_preference (sched, cfg,
+                                            other,
+                                            GNUNET_TIME_UNIT_FOREVER_REL,
+                                            0, 0, preference, NULL, NULL);
   if (0 != (pgc->policy & ROUTING_POLICY_ANSWER))
     pgc->drq = queue_ds_request (BASIC_DATASTORE_REQUEST_DELAY,
                                 &ds_get_request,
@@ -3205,13 +3210,17 @@
  * @param other the other peer involved (sender or receiver, NULL
  *        for loopback messages where we are both sender and receiver)
  * @param message the actual message
+ * @param latency reported latency of the connection with 'other'
+ * @param distance reported distance (DV) to 'other' 
  * @return GNUNET_OK to keep the connection open,
  *         GNUNET_SYSERR to close it (signal serious error)
  */
 static int
 handle_p2p_put (void *cls,
                const struct GNUNET_PeerIdentity *other,
-               const struct GNUNET_MessageHeader *message)
+               const struct GNUNET_MessageHeader *message,
+               struct GNUNET_TIME_Relative latency,
+               uint32_t distance)
 {
   const struct PutMessage *put;
   uint16_t msize;

Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c        2010-01-21 14:52:11 UTC 
(rev 10101)
+++ gnunet/src/topology/gnunet-daemon-topology.c        2010-01-21 14:58:56 UTC 
(rev 10102)
@@ -258,23 +258,11 @@
  * has completed.
  *
  * @param cls our 'struct DisconnectList'
- * @param peer NULL on error (then what?)
- * @param bpm_in set to the current bandwidth limit (receiving) for this peer
- * @param bpm_out set to the current bandwidth limit (sending) for this peer
- * @param latency current latency estimate, "FOREVER" if we have been
- *                disconnected
- * @param amount set to the amount that was actually reserved or unreserved
- * @param preference current traffic preference for the given peer
+ * @param tc unused
  */
 static void
 disconnect_done (void *cls,
-                const struct
-                GNUNET_PeerIdentity * peer,
-                unsigned int bpm_in,
-                unsigned int bpm_out,
-                struct GNUNET_TIME_Relative
-                latency, int amount,
-                unsigned long long preference)
+                const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct DisconnectList *dl = cls;
 
@@ -620,11 +608,15 @@
  *
  * @param cls closure
  * @param peer peer identity this notification is about
+ * @param latency reported latency of the connection with 'other'
+ * @param distance reported distance (DV) to 'other' 
  */
 static void 
 connect_notify (void *cls,
                const struct
-               GNUNET_PeerIdentity * peer)
+               GNUNET_PeerIdentity * peer,
+               struct GNUNET_TIME_Relative latency,
+               uint32_t distance)
 {
   struct PeerList *pos;
 
@@ -1092,6 +1084,8 @@
  * @param other the other peer involved (sender or receiver, NULL
  *        for loopback messages where we are both sender and receiver)
  * @param message the actual HELLO message
+ * @param latency reported latency of the connection with 'other'
+ * @param distance reported distance (DV) to 'other' 
  * @return GNUNET_OK to keep the connection open,
  *         GNUNET_SYSERR to close it (signal serious error)
  */
@@ -1099,7 +1093,9 @@
 handle_encrypted_hello (void *cls,
                        const struct GNUNET_PeerIdentity * other,
                        const struct GNUNET_MessageHeader *
-                       message)
+                       message,
+                       struct GNUNET_TIME_Relative latency,
+                       uint32_t distance)
 {
 #if DEBUG_TOPOLOGY
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1213,7 +1209,7 @@
       GNUNET_CONTAINER_DLL_remove (disconnect_head,
                                   disconnect_tail,
                                   dl);
-      GNUNET_CORE_peer_get_info_cancel (dl->rh);
+      GNUNET_CORE_peer_request_cancel (dl->rh);
       GNUNET_free (dl);
     }
 }





reply via email to

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