[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27399 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27399 - gnunet/src/ats |
Date: |
Fri, 7 Jun 2013 16:51:00 +0200 |
Author: wachs
Date: 2013-06-07 16:51:00 +0200 (Fri, 07 Jun 2013)
New Revision: 27399
Modified:
gnunet/src/ats/gnunet-service-ats-solver_proportional.c
gnunet/src/ats/gnunet-service-ats_addresses.c
gnunet/src/ats/gnunet-service-ats_addresses.h
Log:
changes
Modified: gnunet/src/ats/gnunet-service-ats-solver_proportional.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats-solver_proportional.c 2013-06-07
13:59:44 UTC (rev 27398)
+++ gnunet/src/ats/gnunet-service-ats-solver_proportional.c 2013-06-07
14:51:00 UTC (rev 27399)
@@ -1315,17 +1315,15 @@
uint32_t network);
/**
- * Updates a single address in the solver
+ * Updates a single address in the solver and checks previous values
*
- * If ATS information was updated, the previous values are passed
- *
* @param solver the solver Handle
* @param addresses the address hashmap containing all addresses
* @param address the update address
- * @param session the new session (if changed otherwise current)
- * @param in_use the new address in use state (if changed otherwise current)
- * @param prev_ats ATS information
- * @param prev_atsi_count the atsi count
+ * @param session the previous session
+ * @param in_use the previous address in use state
+ * @param prev_ats previous ATS information
+ * @param prev_atsi_count the previous atsi count
*/
void
GAS_proportional_address_update (void *solver,
@@ -1433,14 +1431,12 @@
if (address->session_id != session)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Session changed from %u to %u\n", address->session_id,
session);
- address->session_id = session;
+ "Session changed from %u to %u\n", session,
address->session_id);
}
if (address->used != in_use)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Usage changed from %u to %u\n", address->used, in_use);
- address->used = in_use;
+ "Usage changed from %u to %u\n", in_use, address->used);
}
}
Modified: gnunet/src/ats/gnunet-service-ats_addresses.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats_addresses.c 2013-06-07 13:59:44 UTC
(rev 27398)
+++ gnunet/src/ats/gnunet-service-ats_addresses.c 2013-06-07 14:51:00 UTC
(rev 27399)
@@ -878,7 +878,6 @@
uint32_t atsi_delta_count;
uint32_t prev_session;
-
if (GNUNET_NO == handle->running)
return;
@@ -917,6 +916,7 @@
prev_session = aa->session_id;
aa->session_id = session_id;
+
/* Tell solver about update */
handle->s_update (handle->solver, handle->addresses, aa, prev_session,
aa->used, atsi_delta, atsi_delta_count);
GNUNET_free_non_null (atsi_delta);
@@ -1104,6 +1104,7 @@
int in_use)
{
struct ATS_Address *ea;
+ int prev_inuse;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received `%s' for peer `%s'\n",
@@ -1138,9 +1139,11 @@
}
/* Tell solver about update */
- handle->s_update (handle->solver, handle->addresses, ea, session_id, in_use,
NULL, 0);
+ prev_inuse = ea->used;
ea->used = in_use;
+ handle->s_update (handle->solver, handle->addresses, ea, session_id,
prev_inuse, NULL, 0);
+
return GNUNET_OK;
}
Modified: gnunet/src/ats/gnunet-service-ats_addresses.h
===================================================================
--- gnunet/src/ats/gnunet-service-ats_addresses.h 2013-06-07 13:59:44 UTC
(rev 27398)
+++ gnunet/src/ats/gnunet-service-ats_addresses.h 2013-06-07 14:51:00 UTC
(rev 27399)
@@ -445,7 +445,7 @@
* @param addresses the address hashmap containing all addresses
* @param address the address
* @param session the previous session
- * @param in_use address used: yes or no
+ * @param in_use previous address used state: yes or no
* @param atsi ats previous performance information
* @param atsi_count previous number of ats performance information
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27399 - gnunet/src/ats,
gnunet <=