GNUNET_free_non_null (n->issuer_id);
- GNUNET_CONTAINER_multihashmap_remove (cur, key, value);
+ GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (cur, key, value));
GNUNET_free (value);
return GNUNET_OK;
}
* Core startup callback
*
* @param cls unused
- * @param server core service's server handle
* @param my_identity my id
*/
static void
core_startup_handler (void *cls,
- struct GNUNET_CORE_Handle *server,
const struct GNUNET_PeerIdentity *my_identity)
{
- me = *my_identity;
+ me = *my_identity;
}
-void
+
+static void
schedule_transmisson (struct NodeComCtx *e_ctx);
-size_t
+
+static size_t
transmit_read_wrapper (void *cls, size_t bufsize, void *buf)
{
struct NodeComCtx *e_ctx = cls;
return res;
}
-void
+
+static void
schedule_transmisson (struct NodeComCtx *e_ctx)
{
if (NULL != e_ctx->n->cth)
&e_ctx->n->id, e_ctx->size, transmit_read_wrapper, e_ctx);
if (NULL == e_ctx->n->cth)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Cannot send message to peer `%s' for experiment `%s'\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Cannot send message to peer `%s' for experiment `%s'\n"),
GNUNET_i2s(&e_ctx->n->id), e_ctx->e->name);
GNUNET_free (e_ctx);
}
{
struct Node *n = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Removing request for peer %s due to timeout\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Removing request for peer %s due to timeout\n",
GNUNET_i2s (&n->id));
if (GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains (nodes_requested, &n->id.hashPubKey))
{
- GNUNET_CONTAINER_multihashmap_remove (nodes_requested, &n->id.hashPubKey, n);
+ GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (nodes_requested, &n->id.hashPubKey, n));
update_stats (nodes_requested);
GNUNET_CONTAINER_multihashmap_put (nodes_inactive, &n->id.hashPubKey, n,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
size_t ri_size = sizeof (struct Experimentation_Issuer) * GSE_my_issuer_count;
size_t total_size = msg_size + ri_size;
- memset (buf, '0', bufsize);
+ memset (buf, '\0', bufsize);
n->cth = NULL;
if (buf == NULL)
{
memcpy (buf, &msg, msg_size);
memcpy (&((char *) buf)[msg_size], GSE_my_issuer, ri_size);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Sending request to peer %s\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Sending experimentation request to peer %s\n"),
GNUNET_i2s (&n->id));
return total_size;
}
memcpy (buf, &msg, msg_size);
memcpy (&((char *) buf)[msg_size], GSE_my_issuer, ri_size);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Sending response to peer %s\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending response to peer %s\n",
GNUNET_i2s (&n->id));
return total_size;
}
{
static int counter = 0;
if (NULL == e)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Added %u experiments for peer %s\n"),
- counter, GNUNET_i2s (&n->id));
- return;
- }
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Starting experiment `%s' with peer %s\n"),
- e->name,
- GNUNET_i2s (&n->id));
+ return; /* Done */
/* Tell the scheduler to add a node with an experiment */
GED_scheduler_add (n, e, GNUNET_YES);
}
else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_inactive, &peer->hashPubKey)))
{
- GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n);
+ GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n));
update_stats (nodes_inactive);
make_active = GNUNET_YES;
}
if (GNUNET_YES == GED_experiments_issuer_accepted(&rmi[c1].issuer_id))
ic_accepted ++;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Request from peer `%s' with %u issuers, we accepted %u issuer \n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Request from peer `%s' with %u issuers, we accepted %u issuer \n",
GNUNET_i2s (peer), ic, ic_accepted);
GNUNET_free_non_null (n->issuer_id);
n->issuer_id = GNUNET_malloc (ic_accepted * sizeof (struct GNUNET_PeerIdentity));
make_active = GNUNET_NO;
if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_active, &peer->hashPubKey)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Received %s from %s peer `%s'\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from %s peer `%s'\n",
"RESPONSE", "active", GNUNET_i2s (peer));
}
else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_requested, &peer->hashPubKey)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Received %s from %s peer `%s'\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from %s peer `%s'\n",
"RESPONSE", "requested", GNUNET_i2s (peer));
GNUNET_CONTAINER_multihashmap_remove (nodes_requested, &peer->hashPubKey, n);
if (GNUNET_SCHEDULER_NO_TASK != n->timeout_task)
}
else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_inactive, &peer->hashPubKey)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Received %s from peer `%s'\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from peer `%s'\n",
"RESPONSE", "inactive", GNUNET_i2s (peer));
- GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n);
+ GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n));
update_stats (nodes_inactive);
make_active = GNUNET_YES;
}
else
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Received %s from %s peer `%s'\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from %s peer `%s'\n",
"RESPONSE", "unknown", GNUNET_i2s (peer));
return;
}
if (GNUNET_YES == GED_experiments_issuer_accepted(&rmi[c1].issuer_id))
ic_accepted ++;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Response from peer `%s' with %u issuers, we accepted %u issuer \n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Response from peer `%s' with %u issuers, we accepted %u issuer \n",
GNUNET_i2s (peer), ic, ic_accepted);
GNUNET_free_non_null (n->issuer_id);
n->issuer_id = GNUNET_malloc (ic_accepted * sizeof (struct GNUNET_PeerIdentity));
{
struct NodeComCtx *e_ctx;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Sending %s for experiment request to peer `%s' for experiment `%s'\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending %s for experiment request to peer `%s' for experiment `%s'\n",
"START_ACK" ,GNUNET_i2s(&n->id), e->name);
e_ctx = GNUNET_malloc (sizeof (struct NodeComCtx));
* @return GNUNET_NO if core was busy with sending, GNUNET_OK otherwise
*/
int
-GED_nodes_request_start (struct Node *n, struct Experiment *e)
+GED_nodes_send_start (struct Node *n, struct Experiment *e)
{
struct NodeComCtx *e_ctx;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Sending %s for experiment request to peer `%s' for experiment `%s'\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending %s for experiment request to peer `%s' for experiment `%s'\n",
"START", GNUNET_i2s(&n->id), e->name);
e_ctx = GNUNET_malloc (sizeof (struct NodeComCtx));