gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r29235 - gnunet/src/ats


From: gnunet
Subject: [GNUnet-SVN] r29235 - gnunet/src/ats
Date: Fri, 13 Sep 2013 10:35:03 +0200

Author: wachs
Date: 2013-09-13 10:35:03 +0200 (Fri, 13 Sep 2013)
New Revision: 29235

Modified:
   gnunet/src/ats/gnunet-service-ats-solver_mlp.c
Log:
fixes: resolve on canceling address request


Modified: gnunet/src/ats/gnunet-service-ats-solver_mlp.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats-solver_mlp.c      2013-09-13 08:10:35 UTC 
(rev 29234)
+++ gnunet/src/ats/gnunet-service-ats-solver_mlp.c      2013-09-13 08:35:03 UTC 
(rev 29235)
@@ -1047,10 +1047,7 @@
        }
 
        if (0 == GNUNET_CONTAINER_multihashmap_size(mlp->requested_peers))
-       {
-               GNUNET_break (0);
-               return GNUNET_OK;
-       }
+               return GNUNET_OK; /* No pending requests */
        if (0 == GNUNET_CONTAINER_multihashmap_size(mlp->addresses))
                return GNUNET_OK; /* No addresses available */
 
@@ -1424,6 +1421,7 @@
                GNUNET_free (mlpi);
                address->solver_information = NULL;
        }
+       address->active = GNUNET_NO;
 
   /* Is this peer included in the problem? */
   if (NULL == (p = GNUNET_CONTAINER_multihashmap_get (mlp->requested_peers, 
&address->peer.hashPubKey)))
@@ -1440,7 +1438,9 @@
        /* Problem size changed: new address for peer with pending request */
        mlp->mlp_prob_changed = GNUNET_YES;
        if (GNUNET_YES == mlp->mlp_auto_solve)
+       {
                GAS_mlp_solve_problem (solver);
+       }
   return;
 }
 
@@ -1602,11 +1602,16 @@
 
   GNUNET_assert (NULL != solver);
   GNUNET_assert (NULL != peer);
-
   if (NULL != (p = GNUNET_CONTAINER_multihashmap_get (mlp->requested_peers, 
&peer->hashPubKey)))
   {
        GNUNET_CONTAINER_multihashmap_remove (mlp->requested_peers, 
&peer->hashPubKey, p);
        GNUNET_free (p);
+
+       mlp->mlp_prob_changed = GNUNET_YES;
+       if (GNUNET_YES == mlp->mlp_auto_solve)
+       {
+               GAS_mlp_solve_problem (solver);
+       }
   }
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]