diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-01-12 12:56:04 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-01-12 12:56:04 +0000 |
commit | 792e574709745c6ebef2bf8d1d003fc527539e1e (patch) | |
tree | d32868537b88b97050a56607a987bef1b485c038 /src | |
parent | 505c64843855d5a96e7a70e54260c345415de508 (diff) | |
download | gnunet-792e574709745c6ebef2bf8d1d003fc527539e1e.tar.gz gnunet-792e574709745c6ebef2bf8d1d003fc527539e1e.zip |
- fix wrong documentation
Diffstat (limited to 'src')
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.c | 9 |
1 files 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, | |||
303 | 303 | ||
304 | 304 | ||
305 | /** | 305 | /** |
306 | * Update a bandwidth assignment for a peer. This trivial method currently | 306 | * Delete an address |
307 | * simply assigns the same share to all active connections. | 307 | * |
308 | * If session != 0, just the session is deleted, the address itself still exists | ||
309 | * If session == 0, remove full address | ||
310 | * If session == 0 and addrlen == 0, destroy inbound address | ||
308 | * | 311 | * |
309 | * @param cls unused | 312 | * @param cls unused |
310 | * @param key unused | 313 | * @param key unused |
@@ -320,6 +323,7 @@ destroy_by_session_id (void *cls, const GNUNET_HashCode * key, void *value) | |||
320 | GNUNET_assert (0 == | 323 | GNUNET_assert (0 == |
321 | memcmp (&aa->peer, &info->peer, | 324 | memcmp (&aa->peer, &info->peer, |
322 | sizeof (struct GNUNET_PeerIdentity))); | 325 | sizeof (struct GNUNET_PeerIdentity))); |
326 | /* session == 0, remove full address */ | ||
323 | if ((info->session_id == 0) && (0 == strcmp (info->plugin, aa->plugin)) && | 327 | if ((info->session_id == 0) && (0 == strcmp (info->plugin, aa->plugin)) && |
324 | (aa->addr_len == info->addr_len) && | 328 | (aa->addr_len == info->addr_len) && |
325 | (0 == memcmp (info->addr, aa->addr, aa->addr_len))) | 329 | (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) | |||
331 | recalculate_assigned_bw (); | 335 | recalculate_assigned_bw (); |
332 | return GNUNET_OK; | 336 | return GNUNET_OK; |
333 | } | 337 | } |
338 | /* session != 0, just remove session */ | ||
334 | if (aa->session_id != info->session_id) | 339 | if (aa->session_id != info->session_id) |
335 | return GNUNET_OK; /* irrelevant */ | 340 | return GNUNET_OK; /* irrelevant */ |
336 | if (aa->session_id != 0) | 341 | if (aa->session_id != 0) |