aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/psyc/gnunet-service-psyc.c30
-rw-r--r--src/social/social_api.c16
-rw-r--r--src/social/test_social.c2
3 files changed, 18 insertions, 30 deletions
diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c
index 740886423..cf161435a 100644
--- a/src/psyc/gnunet-service-psyc.c
+++ b/src/psyc/gnunet-service-psyc.c
@@ -1188,12 +1188,12 @@ fragment_queue_insert (struct Channel *chn,
1188 else if (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD == first_ptype 1188 else if (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD == first_ptype
1189 || frag_offset == fragq->header_size) 1189 || frag_offset == fragq->header_size)
1190 { /* header is now complete */ 1190 { /* header is now complete */
1191 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1191 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1192 "%p Header of message %" PRIu64 " is complete.\n", 1192 "%p Header of message %" PRIu64 " is complete.\n",
1193 chn, 1193 chn,
1194 GNUNET_ntohll (mmsg->message_id)); 1194 GNUNET_ntohll (mmsg->message_id));
1195 1195
1196 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1196 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1197 "%p Adding message %" PRIu64 " to queue.\n", 1197 "%p Adding message %" PRIu64 " to queue.\n",
1198 chn, 1198 chn,
1199 GNUNET_ntohll (mmsg->message_id)); 1199 GNUNET_ntohll (mmsg->message_id));
@@ -1201,7 +1201,7 @@ fragment_queue_insert (struct Channel *chn,
1201 } 1201 }
1202 else 1202 else
1203 { 1203 {
1204 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1204 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1205 "%p Header of message %" PRIu64 " is NOT complete yet: %" PRIu64 " != %" PRIu64 "\n", 1205 "%p Header of message %" PRIu64 " is NOT complete yet: %" PRIu64 " != %" PRIu64 "\n",
1206 chn, 1206 chn,
1207 GNUNET_ntohll (mmsg->message_id), 1207 GNUNET_ntohll (mmsg->message_id),
@@ -1216,7 +1216,7 @@ fragment_queue_insert (struct Channel *chn,
1216 if (frag_offset == fragq->size) 1216 if (frag_offset == fragq->size)
1217 fragq->state = MSG_FRAG_STATE_END; 1217 fragq->state = MSG_FRAG_STATE_END;
1218 else 1218 else
1219 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1219 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1220 "%p Message %" PRIu64 " is NOT complete yet: %" PRIu64 " != %" PRIu64 "\n", 1220 "%p Message %" PRIu64 " is NOT complete yet: %" PRIu64 " != %" PRIu64 "\n",
1221 chn, 1221 chn,
1222 GNUNET_ntohll (mmsg->message_id), 1222 GNUNET_ntohll (mmsg->message_id),
@@ -1271,7 +1271,7 @@ static void
1271fragment_queue_run (struct Channel *chn, uint64_t msg_id, 1271fragment_queue_run (struct Channel *chn, uint64_t msg_id,
1272 struct FragmentQueue *fragq, uint8_t drop) 1272 struct FragmentQueue *fragq, uint8_t drop)
1273{ 1273{
1274 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1274 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1275 "%p Running message fragment queue for message %" PRIu64 " (state: %u).\n", 1275 "%p Running message fragment queue for message %" PRIu64 " (state: %u).\n",
1276 chn, 1276 chn,
1277 msg_id, 1277 msg_id,
@@ -1399,7 +1399,7 @@ store_recv_state_modify_result (void *cls, int64_t result,
1399static uint64_t 1399static uint64_t
1400message_queue_run (struct Channel *chn) 1400message_queue_run (struct Channel *chn)
1401{ 1401{
1402 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1402 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1403 "%p Running message queue.\n", chn); 1403 "%p Running message queue.\n", chn);
1404 uint64_t n = 0; 1404 uint64_t n = 0;
1405 uint64_t msg_id; 1405 uint64_t msg_id;
@@ -1407,7 +1407,7 @@ message_queue_run (struct Channel *chn)
1407 while (GNUNET_YES == GNUNET_CONTAINER_heap_peek2 (chn->recv_msgs, NULL, 1407 while (GNUNET_YES == GNUNET_CONTAINER_heap_peek2 (chn->recv_msgs, NULL,
1408 &msg_id)) 1408 &msg_id))
1409 { 1409 {
1410 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1410 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1411 "%p Processing message %" PRIu64 " in queue.\n", chn, msg_id); 1411 "%p Processing message %" PRIu64 " in queue.\n", chn, msg_id);
1412 struct GNUNET_HashCode msg_id_hash; 1412 struct GNUNET_HashCode msg_id_hash;
1413 hash_key_from_hll (&msg_id_hash, msg_id); 1413 hash_key_from_hll (&msg_id_hash, msg_id);
@@ -1417,7 +1417,7 @@ message_queue_run (struct Channel *chn)
1417 1417
1418 if (NULL == fragq || fragq->state <= MSG_FRAG_STATE_HEADER) 1418 if (NULL == fragq || fragq->state <= MSG_FRAG_STATE_HEADER)
1419 { 1419 {
1420 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1420 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1421 "%p No fragq (%p) or header not complete.\n", 1421 "%p No fragq (%p) or header not complete.\n",
1422 chn, fragq); 1422 chn, fragq);
1423 break; 1423 break;
@@ -1439,7 +1439,7 @@ message_queue_run (struct Channel *chn)
1439 && (chn->max_message_id != msg_id - 1 1439 && (chn->max_message_id != msg_id - 1
1440 && chn->max_message_id != msg_id)) 1440 && chn->max_message_id != msg_id))
1441 { 1441 {
1442 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1442 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1443 "%p Out of order message. " 1443 "%p Out of order message. "
1444 "(%" PRIu64 " != %" PRIu64 " - 1)\n", 1444 "(%" PRIu64 " != %" PRIu64 " - 1)\n",
1445 chn, chn->max_message_id, msg_id); 1445 chn, chn->max_message_id, msg_id);
@@ -1455,7 +1455,7 @@ message_queue_run (struct Channel *chn)
1455 { 1455 {
1456 if (msg_id - fragq->state_delta != chn->max_state_message_id) 1456 if (msg_id - fragq->state_delta != chn->max_state_message_id)
1457 { 1457 {
1458 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1458 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1459 "%p Out of order stateful message. " 1459 "%p Out of order stateful message. "
1460 "(%" PRIu64 " - %" PRIu64 " != %" PRIu64 ")\n", 1460 "(%" PRIu64 " - %" PRIu64 " != %" PRIu64 ")\n",
1461 chn, msg_id, fragq->state_delta, chn->max_state_message_id); 1461 chn, msg_id, fragq->state_delta, chn->max_state_message_id);
@@ -1501,8 +1501,6 @@ message_queue_run (struct Channel *chn)
1501static uint64_t 1501static uint64_t
1502message_queue_drop (struct Channel *chn) 1502message_queue_drop (struct Channel *chn)
1503{ 1503{
1504 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1505 "%p Dropping message queue.\n", chn);
1506 uint64_t n = 0; 1504 uint64_t n = 0;
1507 uint64_t msg_id; 1505 uint64_t msg_id;
1508 while (GNUNET_YES == GNUNET_CONTAINER_heap_peek2 (chn->recv_msgs, NULL, 1506 while (GNUNET_YES == GNUNET_CONTAINER_heap_peek2 (chn->recv_msgs, NULL,
@@ -2241,12 +2239,10 @@ transmit_message (struct Channel *chn)
2241static void 2239static void
2242master_queue_message (struct Master *mst, struct TransmitMessage *tmit_msg) 2240master_queue_message (struct Master *mst, struct TransmitMessage *tmit_msg)
2243{ 2241{
2244 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%p master_queue_message()\n", mst);
2245
2246 if (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD == tmit_msg->first_ptype) 2242 if (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD == tmit_msg->first_ptype)
2247 { 2243 {
2248 tmit_msg->id = ++mst->max_message_id; 2244 tmit_msg->id = ++mst->max_message_id;
2249 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 2245 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2250 "%p master_queue_message: message_id=%" PRIu64 "\n", 2246 "%p master_queue_message: message_id=%" PRIu64 "\n",
2251 mst, tmit_msg->id); 2247 mst, tmit_msg->id);
2252 struct GNUNET_PSYC_MessageMethod *pmeth 2248 struct GNUNET_PSYC_MessageMethod *pmeth
@@ -2258,7 +2254,7 @@ master_queue_message (struct Master *mst, struct TransmitMessage *tmit_msg)
2258 } 2254 }
2259 else if (pmeth->flags & GNUNET_PSYC_MASTER_TRANSMIT_STATE_MODIFY) 2255 else if (pmeth->flags & GNUNET_PSYC_MASTER_TRANSMIT_STATE_MODIFY)
2260 { 2256 {
2261 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 2257 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2262 "%p master_queue_message: state_delta=%" PRIu64 "\n", 2258 "%p master_queue_message: state_delta=%" PRIu64 "\n",
2263 mst, tmit_msg->id - mst->max_state_message_id); 2259 mst, tmit_msg->id - mst->max_state_message_id);
2264 pmeth->state_delta = GNUNET_htonll (tmit_msg->id 2260 pmeth->state_delta = GNUNET_htonll (tmit_msg->id
@@ -2267,7 +2263,7 @@ master_queue_message (struct Master *mst, struct TransmitMessage *tmit_msg)
2267 } 2263 }
2268 else 2264 else
2269 { 2265 {
2270 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 2266 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2271 "%p master_queue_message: state not modified\n", mst); 2267 "%p master_queue_message: state not modified\n", mst);
2272 pmeth->state_delta = GNUNET_htonll (GNUNET_PSYC_STATE_NOT_MODIFIED); 2268 pmeth->state_delta = GNUNET_htonll (GNUNET_PSYC_STATE_NOT_MODIFIED);
2273 } 2269 }
diff --git a/src/social/social_api.c b/src/social/social_api.c
index 48e376404..96ddfe912 100644
--- a/src/social/social_api.c
+++ b/src/social/social_api.c
@@ -397,12 +397,9 @@ guest_cleanup (struct GNUNET_SOCIAL_Guest *gst)
397static void 397static void
398place_cleanup (struct GNUNET_SOCIAL_Place *plc) 398place_cleanup (struct GNUNET_SOCIAL_Place *plc)
399{ 399{
400 struct GNUNET_HashCode place_pub_hash; 400 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
401 401 "cleaning up place %p\n",
402 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 402 plc);
403 "place_cleanup\n");
404
405 GNUNET_CRYPTO_hash (&plc->pub_key, sizeof (plc->pub_key), &place_pub_hash);
406 if (NULL != plc->tmit) 403 if (NULL != plc->tmit)
407 { 404 {
408 GNUNET_PSYC_transmit_destroy (plc->tmit); 405 GNUNET_PSYC_transmit_destroy (plc->tmit);
@@ -433,11 +430,6 @@ place_cleanup (struct GNUNET_SOCIAL_Place *plc)
433static void 430static void
434place_disconnect (struct GNUNET_SOCIAL_Place *plc) 431place_disconnect (struct GNUNET_SOCIAL_Place *plc)
435{ 432{
436 struct GNUNET_HashCode place_pub_hash;
437
438 GNUNET_CRYPTO_hash (&plc->pub_key,
439 sizeof (plc->pub_key),
440 &place_pub_hash);
441 place_cleanup (plc); 433 place_cleanup (plc);
442} 434}
443 435
@@ -1515,7 +1507,7 @@ GNUNET_SOCIAL_host_announce (struct GNUNET_SOCIAL_Host *hst,
1515 void *notify_data_cls, 1507 void *notify_data_cls,
1516 enum GNUNET_SOCIAL_AnnounceFlags flags) 1508 enum GNUNET_SOCIAL_AnnounceFlags flags)
1517{ 1509{
1518 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1510 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1519 "PSYC_transmit_message for host, method: %s\n", 1511 "PSYC_transmit_message for host, method: %s\n",
1520 method_name); 1512 method_name);
1521 if (GNUNET_OK == 1513 if (GNUNET_OK ==
diff --git a/src/social/test_social.c b/src/social/test_social.c
index 61dbd121c..4d95cf005 100644
--- a/src/social/test_social.c
+++ b/src/social/test_social.c
@@ -359,7 +359,7 @@ host_farewell2 (void *cls,
359 const struct GNUNET_SOCIAL_Nym *nym, 359 const struct GNUNET_SOCIAL_Nym *nym,
360 struct GNUNET_PSYC_Environment *env) 360 struct GNUNET_PSYC_Environment *env)
361{ 361{
362 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 362 GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
363 "Nym left the place again.\n"); 363 "Nym left the place again.\n");
364 GNUNET_SCHEDULER_add_now (&schedule_host_leave, NULL); 364 GNUNET_SCHEDULER_add_now (&schedule_host_leave, NULL);
365} 365}