[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r25766 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r25766 - gnunet/src/ats |
Date: |
Mon, 14 Jan 2013 11:01:43 +0100 |
Author: wachs
Date: 2013-01-14 11:01:43 +0100 (Mon, 14 Jan 2013)
New Revision: 25766
Modified:
gnunet/src/ats/gnunet-service-ats_addresses_simplistic.c
Log:
fix for quota check
Modified: gnunet/src/ats/gnunet-service-ats_addresses_simplistic.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats_addresses_simplistic.c 2013-01-14
01:47:46 UTC (rev 25765)
+++ gnunet/src/ats/gnunet-service-ats_addresses_simplistic.c 2013-01-14
10:01:43 UTC (rev 25766)
@@ -502,19 +502,25 @@
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Total bandwidth assigned is: (in/out): %llu
/%llu\n",
+ "Total bandwidth assigned is (in/out): %llu /%llu\n",
quota_in_used,
quota_out_used);
- if (quota_out_used > quota_out)
- LOG (GNUNET_ERROR_TYPE_WARNING,
- "DEBUG! Total inbound bandwidth assigned is larget
than allowed %llu /%llu\n",
+ if (quota_out_used > net->total_quota_out + 1) /* +1 is required due to
rounding errors */
+ {
+ GNUNET_break (0);
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Total inbound bandwidth assigned is larget than
allowed %llu /%llu\n",
quota_out_used,
- quota_out); /* FIXME: Can happen atm, we have some
rounding error */
- if (quota_in_used > quota_in)
- LOG (GNUNET_ERROR_TYPE_WARNING,
- "DEBUG! Total inbound bandwidth assigned is larget
than allowed %llu /%llu\n",
+ quota_out);
+ }
+ if (quota_in_used > net->total_quota_in + 1) /* +1 is required due to
rounding errors */
+ {
+ GNUNET_break (0);
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Total inbound bandwidth assigned is larget than
allowed %llu /%llu\n",
quota_in_used,
- quota_in); /* FIXME: Can happen atm, we have some
rounding error */
+ quota_in);
+ }
}
static void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r25766 - gnunet/src/ats,
gnunet <=