gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r26124 - gnunet/src/ats


From: gnunet
Subject: [GNUnet-SVN] r26124 - gnunet/src/ats
Date: Fri, 15 Feb 2013 10:18:43 +0100

Author: wachs
Date: 2013-02-15 10:18:42 +0100 (Fri, 15 Feb 2013)
New Revision: 26124

Modified:
   gnunet/src/ats/gnunet-service-ats_addresses.c
   gnunet/src/ats/test_ats_simplistic_switch_networks.c
Log:
remove static function

Modified: gnunet/src/ats/gnunet-service-ats_addresses.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats_addresses.c       2013-02-15 08:41:31 UTC 
(rev 26123)
+++ gnunet/src/ats/gnunet-service-ats_addresses.c       2013-02-15 09:18:42 UTC 
(rev 26124)
@@ -43,7 +43,10 @@
  *
  * This component manages the addresses known to ATS service and suggests
  * addresses to transport service when it is interested in address suggestions
- * for a peer.
+ * for a peer. ATS addresses also instantiates the bandwidth assignment
+ * mechanism, notifies it about changes to addresses and forwards changes
+ * to bandwidth assignments to transport, depending if transport is interested
+ * in this change.
  *
  * Address management and suggestions
  *

Modified: gnunet/src/ats/test_ats_simplistic_switch_networks.c
===================================================================
--- gnunet/src/ats/test_ats_simplistic_switch_networks.c        2013-02-15 
08:41:31 UTC (rev 26123)
+++ gnunet/src/ats/test_ats_simplistic_switch_networks.c        2013-02-15 
09:18:42 UTC (rev 26124)
@@ -301,87 +301,7 @@
   }
 }
 
-static unsigned int
-load_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg, unsigned long long 
*out_dest, unsigned long long *in_dest, int dest_length)
-{
-  int quotas[GNUNET_ATS_NetworkTypeCount] = GNUNET_ATS_NetworkType;
-  char * entry_in = NULL;
-  char * entry_out = NULL;
-  char * quota_out_str;
-  char * quota_in_str;
-  int c;
 
-  for (c = 0; (c < GNUNET_ATS_NetworkTypeCount) && (c < dest_length); c++)
-  {
-    in_dest[c] = 0;
-    out_dest[c] = 0;
-    switch (quotas[c]) {
-      case GNUNET_ATS_NET_UNSPECIFIED:
-        entry_out = "UNSPECIFIED_QUOTA_OUT";
-        entry_in = "UNSPECIFIED_QUOTA_IN";
-        break;
-      case GNUNET_ATS_NET_LOOPBACK:
-        entry_out = "LOOPBACK_QUOTA_OUT";
-        entry_in = "LOOPBACK_QUOTA_IN";
-        break;
-      case GNUNET_ATS_NET_LAN:
-        entry_out = "LAN_QUOTA_OUT";
-        entry_in = "LAN_QUOTA_IN";
-        break;
-      case GNUNET_ATS_NET_WAN:
-        entry_out = "WAN_QUOTA_OUT";
-        entry_in = "WAN_QUOTA_IN";
-        break;
-      case GNUNET_ATS_NET_WLAN:
-        entry_out = "WLAN_QUOTA_OUT";
-        entry_in = "WLAN_QUOTA_IN";
-        break;
-      default:
-        break;
-    }
-
-    if ((entry_in == NULL) || (entry_out == NULL))
-      continue;
-
-    /* quota out */
-    if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string(cfg, "ats", 
entry_out, &quota_out_str))
-    {
-      if (0 == strcmp(quota_out_str, BIG_M_STRING) ||
-          (GNUNET_SYSERR == GNUNET_STRINGS_fancy_size_to_bytes (quota_out_str, 
&out_dest[c])))
-        out_dest[c] = UINT32_MAX;
-
-      GNUNET_free (quota_out_str);
-      quota_out_str = NULL;
-    }
-    else if (GNUNET_ATS_NET_UNSPECIFIED == quotas[c])
-      out_dest[c] = UINT32_MAX;
-    else
-      out_dest[c] = UINT32_MAX;
-
-    /* quota in */
-    if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string(cfg, "ats", 
entry_in, &quota_in_str))
-    {
-      if (0 == strcmp(quota_in_str, BIG_M_STRING) ||
-          (GNUNET_SYSERR == GNUNET_STRINGS_fancy_size_to_bytes (quota_in_str, 
&in_dest[c])))
-        in_dest[c] = UINT32_MAX;
-
-      GNUNET_free (quota_in_str);
-      quota_in_str = NULL;
-    }
-    else if (GNUNET_ATS_NET_UNSPECIFIED == quotas[c])
-    {
-      in_dest[c] = UINT32_MAX;
-    }
-    else
-    {
-        in_dest[c] = UINT32_MAX;
-    }
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Loaded quota: %s %u, %s %u\n", 
entry_in, in_dest[c], entry_out, out_dest[c]);
-
-  }
-  return GNUNET_ATS_NetworkTypeCount;
-}
-
 static void
 run (void *cls,
      const struct GNUNET_CONFIGURATION_Handle *cfg,




reply via email to

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