diff options
Diffstat (limited to 'src/experimentation/gnunet-daemon-experimentation_nodes.c')
-rw-r--r-- | src/experimentation/gnunet-daemon-experimentation_nodes.c | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/src/experimentation/gnunet-daemon-experimentation_nodes.c b/src/experimentation/gnunet-daemon-experimentation_nodes.c index 3d2868df7..0590a1dec 100644 --- a/src/experimentation/gnunet-daemon-experimentation_nodes.c +++ b/src/experimentation/gnunet-daemon-experimentation_nodes.c | |||
@@ -217,7 +217,7 @@ schedule_transmisson (struct NodeComCtx *e_ctx) | |||
217 | &e_ctx->n->id, e_ctx->size, transmit_read_wrapper, e_ctx); | 217 | &e_ctx->n->id, e_ctx->size, transmit_read_wrapper, e_ctx); |
218 | if (NULL == e_ctx->n->cth) | 218 | if (NULL == e_ctx->n->cth) |
219 | { | 219 | { |
220 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Cannot send message to peer `%s' for experiment `%s'\n"), | 220 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Cannot send message to peer `%s' for experiment `%s'\n"), |
221 | GNUNET_i2s(&e_ctx->n->id), e_ctx->e->name); | 221 | GNUNET_i2s(&e_ctx->n->id), e_ctx->e->name); |
222 | GNUNET_free (e_ctx); | 222 | GNUNET_free (e_ctx); |
223 | } | 223 | } |
@@ -236,7 +236,7 @@ remove_request (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
236 | { | 236 | { |
237 | struct Node *n = cls; | 237 | struct Node *n = cls; |
238 | 238 | ||
239 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Removing request for peer %s due to timeout\n"), | 239 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Removing request for peer %s due to timeout\n", |
240 | GNUNET_i2s (&n->id)); | 240 | GNUNET_i2s (&n->id)); |
241 | 241 | ||
242 | if (GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains (nodes_requested, &n->id.hashPubKey)) | 242 | if (GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains (nodes_requested, &n->id.hashPubKey)) |
@@ -287,7 +287,7 @@ size_t send_experimentation_request_cb (void *cls, size_t bufsize, void *buf) | |||
287 | memcpy (buf, &msg, msg_size); | 287 | memcpy (buf, &msg, msg_size); |
288 | memcpy (&((char *) buf)[msg_size], GSE_my_issuer, ri_size); | 288 | memcpy (&((char *) buf)[msg_size], GSE_my_issuer, ri_size); |
289 | 289 | ||
290 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Sending request to peer %s\n"), | 290 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Sending experimentation request to peer %s\n"), |
291 | GNUNET_i2s (&n->id)); | 291 | GNUNET_i2s (&n->id)); |
292 | return total_size; | 292 | return total_size; |
293 | } | 293 | } |
@@ -361,7 +361,7 @@ size_t send_response_cb (void *cls, size_t bufsize, void *buf) | |||
361 | memcpy (buf, &msg, msg_size); | 361 | memcpy (buf, &msg, msg_size); |
362 | memcpy (&((char *) buf)[msg_size], GSE_my_issuer, ri_size); | 362 | memcpy (&((char *) buf)[msg_size], GSE_my_issuer, ri_size); |
363 | 363 | ||
364 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Sending response to peer %s\n"), | 364 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending response to peer %s\n", |
365 | GNUNET_i2s (&n->id)); | 365 | GNUNET_i2s (&n->id)); |
366 | return total_size; | 366 | return total_size; |
367 | } | 367 | } |
@@ -372,15 +372,7 @@ get_experiments_cb (struct Node *n, struct Experiment *e) | |||
372 | { | 372 | { |
373 | static int counter = 0; | 373 | static int counter = 0; |
374 | if (NULL == e) | 374 | if (NULL == e) |
375 | { | 375 | return; /* Done */ |
376 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Added %u experiments for peer %s\n"), | ||
377 | counter, GNUNET_i2s (&n->id)); | ||
378 | return; | ||
379 | } | ||
380 | |||
381 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Starting experiment `%s' with peer %s\n"), | ||
382 | e->name, | ||
383 | GNUNET_i2s (&n->id)); | ||
384 | 376 | ||
385 | /* Tell the scheduler to add a node with an experiment */ | 377 | /* Tell the scheduler to add a node with an experiment */ |
386 | GED_scheduler_add (n, e, GNUNET_YES); | 378 | GED_scheduler_add (n, e, GNUNET_YES); |
@@ -509,7 +501,7 @@ static void handle_request (const struct GNUNET_PeerIdentity *peer, | |||
509 | if (GNUNET_YES == GED_experiments_issuer_accepted(&rmi[c1].issuer_id)) | 501 | if (GNUNET_YES == GED_experiments_issuer_accepted(&rmi[c1].issuer_id)) |
510 | ic_accepted ++; | 502 | ic_accepted ++; |
511 | } | 503 | } |
512 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Request from peer `%s' with %u issuers, we accepted %u issuer \n"), | 504 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Request from peer `%s' with %u issuers, we accepted %u issuer \n", |
513 | GNUNET_i2s (peer), ic, ic_accepted); | 505 | GNUNET_i2s (peer), ic, ic_accepted); |
514 | GNUNET_free_non_null (n->issuer_id); | 506 | GNUNET_free_non_null (n->issuer_id); |
515 | n->issuer_id = GNUNET_malloc (ic_accepted * sizeof (struct GNUNET_PeerIdentity)); | 507 | n->issuer_id = GNUNET_malloc (ic_accepted * sizeof (struct GNUNET_PeerIdentity)); |
@@ -573,12 +565,12 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer, | |||
573 | make_active = GNUNET_NO; | 565 | make_active = GNUNET_NO; |
574 | if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_active, &peer->hashPubKey))) | 566 | if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_active, &peer->hashPubKey))) |
575 | { | 567 | { |
576 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Received %s from %s peer `%s'\n"), | 568 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from %s peer `%s'\n", |
577 | "RESPONSE", "active", GNUNET_i2s (peer)); | 569 | "RESPONSE", "active", GNUNET_i2s (peer)); |
578 | } | 570 | } |
579 | else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_requested, &peer->hashPubKey))) | 571 | else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_requested, &peer->hashPubKey))) |
580 | { | 572 | { |
581 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Received %s from %s peer `%s'\n"), | 573 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from %s peer `%s'\n", |
582 | "RESPONSE", "requested", GNUNET_i2s (peer)); | 574 | "RESPONSE", "requested", GNUNET_i2s (peer)); |
583 | GNUNET_CONTAINER_multihashmap_remove (nodes_requested, &peer->hashPubKey, n); | 575 | GNUNET_CONTAINER_multihashmap_remove (nodes_requested, &peer->hashPubKey, n); |
584 | if (GNUNET_SCHEDULER_NO_TASK != n->timeout_task) | 576 | if (GNUNET_SCHEDULER_NO_TASK != n->timeout_task) |
@@ -591,7 +583,7 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer, | |||
591 | } | 583 | } |
592 | else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_inactive, &peer->hashPubKey))) | 584 | else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_inactive, &peer->hashPubKey))) |
593 | { | 585 | { |
594 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Received %s from peer `%s'\n"), | 586 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from peer `%s'\n", |
595 | "RESPONSE", "inactive", GNUNET_i2s (peer)); | 587 | "RESPONSE", "inactive", GNUNET_i2s (peer)); |
596 | GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n); | 588 | GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n); |
597 | update_stats (nodes_inactive); | 589 | update_stats (nodes_inactive); |
@@ -599,7 +591,7 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer, | |||
599 | } | 591 | } |
600 | else | 592 | else |
601 | { | 593 | { |
602 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Received %s from %s peer `%s'\n"), | 594 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from %s peer `%s'\n", |
603 | "RESPONSE", "unknown", GNUNET_i2s (peer)); | 595 | "RESPONSE", "unknown", GNUNET_i2s (peer)); |
604 | return; | 596 | return; |
605 | } | 597 | } |
@@ -614,7 +606,7 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer, | |||
614 | if (GNUNET_YES == GED_experiments_issuer_accepted(&rmi[c1].issuer_id)) | 606 | if (GNUNET_YES == GED_experiments_issuer_accepted(&rmi[c1].issuer_id)) |
615 | ic_accepted ++; | 607 | ic_accepted ++; |
616 | } | 608 | } |
617 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Response from peer `%s' with %u issuers, we accepted %u issuer \n"), | 609 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Response from peer `%s' with %u issuers, we accepted %u issuer \n", |
618 | GNUNET_i2s (peer), ic, ic_accepted); | 610 | GNUNET_i2s (peer), ic, ic_accepted); |
619 | GNUNET_free_non_null (n->issuer_id); | 611 | GNUNET_free_non_null (n->issuer_id); |
620 | n->issuer_id = GNUNET_malloc (ic_accepted * sizeof (struct GNUNET_PeerIdentity)); | 612 | n->issuer_id = GNUNET_malloc (ic_accepted * sizeof (struct GNUNET_PeerIdentity)); |
@@ -1003,7 +995,8 @@ GED_nodes_send_start_ack (struct Node *n, struct Experiment *e) | |||
1003 | { | 995 | { |
1004 | struct NodeComCtx *e_ctx; | 996 | struct NodeComCtx *e_ctx; |
1005 | 997 | ||
1006 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Sending %s for experiment request to peer `%s' for experiment `%s'\n"), | 998 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
999 | "Sending %s for experiment request to peer `%s' for experiment `%s'\n", | ||
1007 | "START_ACK" ,GNUNET_i2s(&n->id), e->name); | 1000 | "START_ACK" ,GNUNET_i2s(&n->id), e->name); |
1008 | 1001 | ||
1009 | e_ctx = GNUNET_malloc (sizeof (struct NodeComCtx)); | 1002 | e_ctx = GNUNET_malloc (sizeof (struct NodeComCtx)); |
@@ -1025,11 +1018,12 @@ GED_nodes_send_start_ack (struct Node *n, struct Experiment *e) | |||
1025 | * @return GNUNET_NO if core was busy with sending, GNUNET_OK otherwise | 1018 | * @return GNUNET_NO if core was busy with sending, GNUNET_OK otherwise |
1026 | */ | 1019 | */ |
1027 | int | 1020 | int |
1028 | GED_nodes_request_start (struct Node *n, struct Experiment *e) | 1021 | GED_nodes_send_start (struct Node *n, struct Experiment *e) |
1029 | { | 1022 | { |
1030 | struct NodeComCtx *e_ctx; | 1023 | struct NodeComCtx *e_ctx; |
1031 | 1024 | ||
1032 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Sending %s for experiment request to peer `%s' for experiment `%s'\n"), | 1025 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1026 | "Sending %s for experiment request to peer `%s' for experiment `%s'\n", | ||
1033 | "START", GNUNET_i2s(&n->id), e->name); | 1027 | "START", GNUNET_i2s(&n->id), e->name); |
1034 | 1028 | ||
1035 | e_ctx = GNUNET_malloc (sizeof (struct NodeComCtx)); | 1029 | e_ctx = GNUNET_malloc (sizeof (struct NodeComCtx)); |