* @author Matthias Wachs
*/
#include "platform.h"
-#include "gnunet_getopt_lib.h"
#include "gnunet_util_lib.h"
#include "gnunet_core_service.h"
#include "gnunet_statistics_service.h"
void
GED_scheduler_handle_start (struct Node *n, struct Experiment *e)
{
- struct ScheduledExperiment *se;
-
- if ((NULL != (se = find_experiment (waiting_in_head, waiting_in_tail, n, e, GNUNET_NO))) ||
- (NULL != (se = find_experiment (running_in_head, running_in_tail, n, e, GNUNET_NO))))
- {
- GNUNET_break_op (0);
- return;
- }
-
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s message from peer %s for experiment `%s'\n",
- "START", GNUNET_i2s (&n->id), e->name);
-
- GED_scheduler_add (n, e, GNUNET_NO);
+ if ((NULL != find_experiment (waiting_in_head, waiting_in_tail, n, e, GNUNET_NO)) ||
+ (NULL != find_experiment (running_in_head, running_in_tail, n, e, GNUNET_NO)))
+ {
+ GNUNET_break_op (0);
+ return;
+ }
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Received %s message from peer %s for experiment `%s'\n",
+ "START", GNUNET_i2s (&n->id), e->name);
+ GED_scheduler_add (n, e, GNUNET_NO);
}
+
/**
* Handle a START_ACK message from a remote node
*
return; /* End of experiment is reached */
/* Add additional checks here if required */
- se = GNUNET_malloc (sizeof (struct ScheduledExperiment));
+ se = GNUNET_new (struct ScheduledExperiment);
se->state = NOT_RUNNING;
se->outbound = outbound;
se->e = e;