[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r17526 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r17526 - gnunet/src/ats |
Date: |
Mon, 17 Oct 2011 12:04:07 +0200 |
Author: grothoff
Date: 2011-10-17 12:04:07 +0200 (Mon, 17 Oct 2011)
New Revision: 17526
Modified:
gnunet/src/ats/gnunet-service-ats_addresses.c
Log:
fix
Modified: gnunet/src/ats/gnunet-service-ats_addresses.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats_addresses.c 2011-10-17 09:59:05 UTC
(rev 17525)
+++ gnunet/src/ats/gnunet-service-ats_addresses.c 2011-10-17 10:04:07 UTC
(rev 17526)
@@ -100,6 +100,7 @@
if (GNUNET_YES != aa->active)
return GNUNET_OK;
+ GNUNET_assert (active_addr_count > 0);
aa->assigned_bw_in.value__ = htonl (total_quota_in / active_addr_count);
aa->assigned_bw_out.value__ = htonl (total_quota_out / active_addr_count);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -158,6 +159,7 @@
if (GNUNET_YES == addr->active)
{
active_addr_count--;
+ addr->active = GNUNET_NO;
ret = GNUNET_YES;
}
GNUNET_free_non_null (addr->ats);
@@ -292,6 +294,9 @@
old->atsp_cost_wlan = ntohl (atsi[i].value);
break;
default:
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Received unsupported ATS type %u\n",
+ ntohl (atsi[i].type));
GNUNET_break (0);
break;
}
@@ -329,6 +334,7 @@
res->session_id = 0;
if (GNUNET_YES == res->active)
{
+ res->active = GNUNET_NO;
active_addr_count--;
recalculate_assigned_bw ();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r17526 - gnunet/src/ats,
gnunet <=