[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29627 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29627 - gnunet/src/ats |
Date: |
Thu, 26 Sep 2013 17:39:45 +0200 |
Author: wachs
Date: 2013-09-26 17:39:45 +0200 (Thu, 26 Sep 2013)
New Revision: 29627
Modified:
gnunet/src/ats/gnunet-service-ats-solver_mlp.c
Log:
exclude requested peer from propagation since addresses will send result
Modified: gnunet/src/ats/gnunet-service-ats-solver_mlp.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats-solver_mlp.c 2013-09-26 15:39:03 UTC
(rev 29626)
+++ gnunet/src/ats/gnunet-service-ats-solver_mlp.c 2013-09-26 15:39:45 UTC
(rev 29627)
@@ -935,7 +935,6 @@
}
}
-
/**
* Propagates the results when MLP problem was solved
*
@@ -998,8 +997,8 @@
mlpi->b_in.value__ = htonl(mlp_bw_in);
address->assigned_bw_out.value__ = htonl (mlp_bw_out);
mlpi->b_out.value__ = htonl(mlp_bw_out);
-
- mlp->bw_changed_cb (mlp->bw_changed_cb_cls, address);
+ if ((NULL == mlp->exclude_peer) || (0 != memcmp (&address->peer,
mlp->exclude_peer, sizeof (address->peer))))
+ mlp->bw_changed_cb (mlp->bw_changed_cb_cls, address);
return GNUNET_OK;
}
else if (GNUNET_YES == address->active)
@@ -1014,8 +1013,8 @@
mlpi->b_in.value__ = htonl(mlp_bw_in);
address->assigned_bw_out.value__ = htonl (mlp_bw_out);
mlpi->b_out.value__ = htonl(mlp_bw_out);
-
- mlp->bw_changed_cb (mlp->bw_changed_cb_cls, address);
+ if ((NULL == mlp->exclude_peer) || (0 != memcmp (&address->peer,
mlp->exclude_peer, sizeof (address->peer))))
+ mlp->bw_changed_cb (mlp->bw_changed_cb_cls, address);
return GNUNET_OK;
}
}
@@ -1056,8 +1055,6 @@
return GNUNET_OK;
}
-
-
/**
* Solves the MLP problem
*
@@ -1151,7 +1148,9 @@
/* Propagate result*/
if ((GNUNET_OK == res_lp) && (GNUNET_OK == res_mip))
+ {
GNUNET_CONTAINER_multihashmap_iterate (mlp->addresses,
&mlp_propagate_results, mlp);
+ }
struct GNUNET_TIME_Absolute time = GNUNET_TIME_absolute_get();
if (GNUNET_YES == mlp->write_mip_mps)
@@ -1596,7 +1595,11 @@
if ((GNUNET_YES == mlp->mlp_auto_solve)&&
(GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains(mlp->addresses,
&peer->hashPubKey)))
+ {
+ mlp->exclude_peer = peer;
GAS_mlp_solve_problem (mlp);
+ mlp->exclude_peer = NULL;
+ }
}
/* Get prefered address */
res = NULL;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29627 - gnunet/src/ats,
gnunet <=