[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35285 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35285 - gnunet/src/ats |
Date: |
Thu, 19 Feb 2015 21:30:06 +0100 |
Author: wachs
Date: 2015-02-19 21:30:05 +0100 (Thu, 19 Feb 2015)
New Revision: 35285
Modified:
gnunet/src/ats/plugin_ats_mlp.c
Log:
fix crash: check if problem is already created before updating
Modified: gnunet/src/ats/plugin_ats_mlp.c
===================================================================
--- gnunet/src/ats/plugin_ats_mlp.c 2015-02-18 14:08:39 UTC (rev 35284)
+++ gnunet/src/ats/plugin_ats_mlp.c 2015-02-19 20:30:05 UTC (rev 35285)
@@ -785,7 +785,6 @@
double *val_array;
int *ind_array;
- GNUNET_assert (NULL != p);
GNUNET_assert (NULL != p->prob);
/* Get number of columns and prepare data structure */
@@ -1589,8 +1588,8 @@
{
LOG(GNUNET_ERROR_TYPE_DEBUG, "Problem size changed, rebuilding\n");
notify(mlp, GAS_OP_SOLVE_SETUP_START, GAS_STAT_SUCCESS, GAS_INFO_FULL);
- mlp_delete_problem(mlp);
- if (GNUNET_SYSERR == mlp_create_problem(mlp))
+ mlp_delete_problem (mlp);
+ if (GNUNET_SYSERR == mlp_create_problem (mlp))
{
notify(mlp, GAS_OP_SOLVE_SETUP_STOP, GAS_STAT_FAIL, GAS_INFO_FULL);
return GNUNET_SYSERR;
@@ -1905,6 +1904,9 @@
struct MLP_information *mlpi = address->solver_information;
struct GAS_MLP_Handle *mlp = solver;
+ if (NULL == mlp->p.prob)
+ return; /* There is no MLP problem to update yet */
+
if (NULL == mlpi)
{
LOG (GNUNET_ERROR_TYPE_INFO,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35285 - gnunet/src/ats,
gnunet <=