aboutsummaryrefslogtreecommitdiff
path: root/src/ats/plugin_ats_mlp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/plugin_ats_mlp.c')
-rw-r--r--src/ats/plugin_ats_mlp.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/ats/plugin_ats_mlp.c b/src/ats/plugin_ats_mlp.c
index f2f961f7e..900a07fa5 100644
--- a/src/ats/plugin_ats_mlp.c
+++ b/src/ats/plugin_ats_mlp.c
@@ -2121,22 +2121,17 @@ GAS_mlp_get_preferred_address (void *solver,
2121 * 2121 *
2122 * @param solver the MLP Handle 2122 * @param solver the MLP Handle
2123 * @param address the address to delete 2123 * @param address the address to delete
2124 * @param session_only delete only session not whole address
2125 */ 2124 */
2126static void 2125static void
2127GAS_mlp_address_delete (void *solver, 2126GAS_mlp_address_delete (void *solver,
2128 struct ATS_Address *address, 2127 struct ATS_Address *address)
2129 int session_only)
2130{ 2128{
2131 struct GAS_MLP_Handle *mlp = solver; 2129 struct GAS_MLP_Handle *mlp = solver;
2132 struct MLP_information *mlpi; 2130 struct MLP_information *mlpi;
2133 int was_active; 2131 int was_active;
2134 2132
2135 GNUNET_assert (NULL != solver);
2136 GNUNET_assert (NULL != address);
2137
2138 mlpi = address->solver_information; 2133 mlpi = address->solver_information;
2139 if ((GNUNET_NO == session_only) && (NULL != mlpi)) 2134 if (NULL != mlpi)
2140 { 2135 {
2141 /* Remove full address */ 2136 /* Remove full address */
2142 GNUNET_free (mlpi); 2137 GNUNET_free (mlpi);
@@ -2153,14 +2148,13 @@ GAS_mlp_address_delete (void *solver,
2153 &address->peer)) 2148 &address->peer))
2154 { 2149 {
2155 LOG (GNUNET_ERROR_TYPE_INFO, 2150 LOG (GNUNET_ERROR_TYPE_INFO,
2156 "Deleting %s for peer `%s' without address request \n", 2151 "Deleting address for peer `%s' without address request \n",
2157 (session_only == GNUNET_YES) ? "session" : "address",
2158 GNUNET_i2s(&address->peer)); 2152 GNUNET_i2s(&address->peer));
2159 return; 2153 return;
2160 } 2154 }
2161 LOG (GNUNET_ERROR_TYPE_INFO, "Deleting %s for peer `%s' with address request \n", 2155 LOG (GNUNET_ERROR_TYPE_INFO,
2162 (session_only == GNUNET_YES) ? "session" : "address", 2156 "Deleting address for peer `%s' with address request \n",
2163 GNUNET_i2s(&address->peer)); 2157 GNUNET_i2s (&address->peer));
2164 2158
2165 /* Problem size changed: new address for peer with pending request */ 2159 /* Problem size changed: new address for peer with pending request */
2166 mlp->stat_mlp_prob_changed = GNUNET_YES; 2160 mlp->stat_mlp_prob_changed = GNUNET_YES;
@@ -2176,8 +2170,6 @@ GAS_mlp_address_delete (void *solver,
2176 mlp->env->bandwidth_changed_cb (mlp->env->cls, address); 2170 mlp->env->bandwidth_changed_cb (mlp->env->cls, address);
2177 } 2171 }
2178 } 2172 }
2179
2180 return;
2181} 2173}
2182 2174
2183 2175