From 792e574709745c6ebef2bf8d1d003fc527539e1e Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Thu, 12 Jan 2012 12:56:04 +0000 Subject: [PATCH] - fix wrong documentation --- src/ats/gnunet-service-ats_addresses.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c index b1bf45050..de62379f6 100644 --- a/src/ats/gnunet-service-ats_addresses.c +++ b/src/ats/gnunet-service-ats_addresses.c @@ -303,8 +303,11 @@ GAS_addresses_update (const struct GNUNET_PeerIdentity *peer, /** - * Update a bandwidth assignment for a peer. This trivial method currently - * simply assigns the same share to all active connections. + * Delete an address + * + * If session != 0, just the session is deleted, the address itself still exists + * If session == 0, remove full address + * If session == 0 and addrlen == 0, destroy inbound address * * @param cls unused * @param key unused @@ -320,6 +323,7 @@ destroy_by_session_id (void *cls, const GNUNET_HashCode * key, void *value) GNUNET_assert (0 == memcmp (&aa->peer, &info->peer, sizeof (struct GNUNET_PeerIdentity))); + /* session == 0, remove full address */ if ((info->session_id == 0) && (0 == strcmp (info->plugin, aa->plugin)) && (aa->addr_len == info->addr_len) && (0 == memcmp (info->addr, aa->addr, aa->addr_len))) @@ -331,6 +335,7 @@ destroy_by_session_id (void *cls, const GNUNET_HashCode * key, void *value) recalculate_assigned_bw (); return GNUNET_OK; } + /* session != 0, just remove session */ if (aa->session_id != info->session_id) return GNUNET_OK; /* irrelevant */ if (aa->session_id != 0) -- 2.25.1