diff options
author | lurchi <lurchi@strangeplace.net> | 2017-12-24 13:15:07 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2017-12-24 13:15:07 +0100 |
commit | 804c401123f78873678a8553503e14ab434e9983 (patch) | |
tree | e6da779c84fa7e689a18c03d5dba05c2488bf5d1 /src/psyc | |
parent | 28c941178588fbf349e24a9ebf2dfe36aec2eded (diff) | |
download | gnunet-804c401123f78873678a8553503e14ab434e9983.tar.gz gnunet-804c401123f78873678a8553503e14ab434e9983.zip |
remove debug assertion; add debug output
Diffstat (limited to 'src/psyc')
-rw-r--r-- | src/psyc/psyc_api.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/psyc/psyc_api.c b/src/psyc/psyc_api.c index a045f9eb2..d8f4c98bc 100644 --- a/src/psyc/psyc_api.c +++ b/src/psyc/psyc_api.c | |||
@@ -260,6 +260,10 @@ handle_channel_result (void *cls, | |||
260 | GNUNET_OP_result (chn->op, GNUNET_ntohll (res->op_id), | 260 | GNUNET_OP_result (chn->op, GNUNET_ntohll (res->op_id), |
261 | GNUNET_ntohll (res->result_code), | 261 | GNUNET_ntohll (res->result_code), |
262 | data, data_size, NULL); | 262 | data, data_size, NULL); |
263 | |||
264 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
265 | "handle_channel_result: Received result message with OP ID %" PRIu64 "\n", | ||
266 | GNUNET_ntohll (res->op_id)); | ||
263 | } | 267 | } |
264 | 268 | ||
265 | 269 | ||
@@ -558,7 +562,6 @@ channel_cleanup (struct GNUNET_PSYC_Channel *chn) | |||
558 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 562 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
559 | "cleaning up channel %p\n", | 563 | "cleaning up channel %p\n", |
560 | chn); | 564 | chn); |
561 | GNUNET_assert (0); | ||
562 | if (NULL != chn->tmit) | 565 | if (NULL != chn->tmit) |
563 | { | 566 | { |
564 | GNUNET_PSYC_transmit_destroy (chn->tmit); | 567 | GNUNET_PSYC_transmit_destroy (chn->tmit); |
@@ -566,6 +569,7 @@ channel_cleanup (struct GNUNET_PSYC_Channel *chn) | |||
566 | } | 569 | } |
567 | if (NULL != chn->recv) | 570 | if (NULL != chn->recv) |
568 | { | 571 | { |
572 | |||
569 | GNUNET_PSYC_receive_destroy (chn->recv); | 573 | GNUNET_PSYC_receive_destroy (chn->recv); |
570 | chn->recv = NULL; | 574 | chn->recv = NULL; |
571 | } | 575 | } |
@@ -684,8 +688,11 @@ master_connect (struct GNUNET_PSYC_Master *mst) | |||
684 | GNUNET_MQ_handler_end () | 688 | GNUNET_MQ_handler_end () |
685 | }; | 689 | }; |
686 | 690 | ||
687 | chn->mq = GNUNET_CLIENT_connect (chn->cfg, "psyc", | 691 | chn->mq = GNUNET_CLIENT_connect (chn->cfg, |
688 | handlers, master_disconnected, mst); | 692 | "psyc", |
693 | handlers, | ||
694 | &master_disconnected, | ||
695 | mst); | ||
689 | GNUNET_assert (NULL != chn->mq); | 696 | GNUNET_assert (NULL != chn->mq); |
690 | chn->tmit = GNUNET_PSYC_transmit_create (chn->mq); | 697 | chn->tmit = GNUNET_PSYC_transmit_create (chn->mq); |
691 | 698 | ||
@@ -1244,6 +1251,9 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *chn, | |||
1244 | req->did_join = GNUNET_YES; | 1251 | req->did_join = GNUNET_YES; |
1245 | req->op_id = GNUNET_htonll (GNUNET_OP_add (chn->op, result_cb, cls, NULL)); | 1252 | req->op_id = GNUNET_htonll (GNUNET_OP_add (chn->op, result_cb, cls, NULL)); |
1246 | 1253 | ||
1254 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1255 | "GNUNET_PSYC_channel_slave_add, OP ID: %" PRIu64 "\n", | ||
1256 | GNUNET_ntohll (req->op_id)); | ||
1247 | GNUNET_MQ_send (chn->mq, env); | 1257 | GNUNET_MQ_send (chn->mq, env); |
1248 | } | 1258 | } |
1249 | 1259 | ||
@@ -1294,6 +1304,9 @@ GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *chn, | |||
1294 | req->did_join = GNUNET_NO; | 1304 | req->did_join = GNUNET_NO; |
1295 | req->op_id = GNUNET_htonll (GNUNET_OP_add (chn->op, result_cb, cls, NULL)); | 1305 | req->op_id = GNUNET_htonll (GNUNET_OP_add (chn->op, result_cb, cls, NULL)); |
1296 | 1306 | ||
1307 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1308 | "GNUNET_PSYC_channel_slave_remove, OP ID: %" PRIu64 "\n", | ||
1309 | GNUNET_ntohll (req->op_id)); | ||
1297 | GNUNET_MQ_send (chn->mq, env); | 1310 | GNUNET_MQ_send (chn->mq, env); |
1298 | } | 1311 | } |
1299 | 1312 | ||
@@ -1332,6 +1345,10 @@ channel_history_replay (struct GNUNET_PSYC_Channel *chn, | |||
1332 | req->message_limit = GNUNET_htonll (message_limit); | 1345 | req->message_limit = GNUNET_htonll (message_limit); |
1333 | req->flags = htonl (flags); | 1346 | req->flags = htonl (flags); |
1334 | req->op_id = GNUNET_htonll (hist->op_id); | 1347 | req->op_id = GNUNET_htonll (hist->op_id); |
1348 | |||
1349 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1350 | "channel_history_replay, OP ID: %" PRIu64 "\n", | ||
1351 | GNUNET_ntohll (req->op_id)); | ||
1335 | GNUNET_memcpy (&req[1], method_prefix, method_size); | 1352 | GNUNET_memcpy (&req[1], method_prefix, method_size); |
1336 | 1353 | ||
1337 | GNUNET_MQ_send (chn->mq, env); | 1354 | GNUNET_MQ_send (chn->mq, env); |
@@ -1470,6 +1487,11 @@ channel_state_get (struct GNUNET_PSYC_Channel *chn, | |||
1470 | struct GNUNET_MQ_Envelope * | 1487 | struct GNUNET_MQ_Envelope * |
1471 | env = GNUNET_MQ_msg_extra (req, name_size, type); | 1488 | env = GNUNET_MQ_msg_extra (req, name_size, type); |
1472 | req->op_id = GNUNET_htonll (sr->op_id); | 1489 | req->op_id = GNUNET_htonll (sr->op_id); |
1490 | |||
1491 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1492 | "channel_state_get, OP ID: %" PRIu64 "\n", | ||
1493 | GNUNET_ntohll (req->op_id)); | ||
1494 | |||
1473 | GNUNET_memcpy (&req[1], name, name_size); | 1495 | GNUNET_memcpy (&req[1], name, name_size); |
1474 | 1496 | ||
1475 | GNUNET_MQ_send (chn->mq, env); | 1497 | GNUNET_MQ_send (chn->mq, env); |