diff options
author | lurchi <lurchi@strangeplace.net> | 2017-10-13 22:18:43 +0200 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2017-10-13 22:19:17 +0200 |
commit | 2af1f1b81cefe8307c702f304451ae67c0fa1437 (patch) | |
tree | 8661b354873946a23c69ac5ed7c210b87a6eca60 /src/social | |
parent | 7ca96c1ceb078bcee0da73217b7019c1329939eb (diff) | |
parent | b829c58174f5ac332810436d7b43ff90a92b8426 (diff) | |
download | gnunet-2af1f1b81cefe8307c702f304451ae67c0fa1437.tar.gz gnunet-2af1f1b81cefe8307c702f304451ae67c0fa1437.zip |
Merge branch 'fix_social' of ssh://gnunet.org/gnunet into fix_social
Diffstat (limited to 'src/social')
-rw-r--r-- | src/social/gnunet-service-social.c | 36 | ||||
-rw-r--r-- | src/social/gnunet-social.c | 26 | ||||
-rw-r--r-- | src/social/test_social.c | 106 |
3 files changed, 84 insertions, 84 deletions
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index f888564dc..4541a4e06 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c | |||
@@ -501,7 +501,7 @@ cleanup_host (struct Host *hst) | |||
501 | static void | 501 | static void |
502 | cleanup_guest (struct Guest *gst) | 502 | cleanup_guest (struct Guest *gst) |
503 | { | 503 | { |
504 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 504 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
505 | "cleanup_guest, gst = %p\n", | 505 | "cleanup_guest, gst = %p\n", |
506 | gst); | 506 | gst); |
507 | struct Place *plc = &gst->place; | 507 | struct Place *plc = &gst->place; |
@@ -539,7 +539,7 @@ cleanup_place (void *cls) | |||
539 | { | 539 | { |
540 | struct Place *plc = cls; | 540 | struct Place *plc = cls; |
541 | 541 | ||
542 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 542 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
543 | "%p Cleaning up place %s\n", | 543 | "%p Cleaning up place %s\n", |
544 | plc, GNUNET_h2s (&plc->pub_key_hash)); | 544 | plc, GNUNET_h2s (&plc->pub_key_hash)); |
545 | 545 | ||
@@ -1478,7 +1478,7 @@ app_notify_place_end (struct GNUNET_SERVICE_Client *client) | |||
1478 | void | 1478 | void |
1479 | app_notify_ego (struct Ego *ego, struct GNUNET_SERVICE_Client *client) | 1479 | app_notify_ego (struct Ego *ego, struct GNUNET_SERVICE_Client *client) |
1480 | { | 1480 | { |
1481 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1481 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1482 | "%p Sending ego notification to client: %s\n", | 1482 | "%p Sending ego notification to client: %s\n", |
1483 | client, ego->name); | 1483 | client, ego->name); |
1484 | 1484 | ||
@@ -1513,7 +1513,7 @@ app_notify_ego_end (struct GNUNET_SERVICE_Client *client) | |||
1513 | int | 1513 | int |
1514 | app_place_entry_notify (void *cls, const struct GNUNET_HashCode *key, void *value) | 1514 | app_place_entry_notify (void *cls, const struct GNUNET_HashCode *key, void *value) |
1515 | { | 1515 | { |
1516 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1516 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1517 | "app_place_entry_notify\n"); | 1517 | "app_place_entry_notify\n"); |
1518 | struct GNUNET_MessageHeader * | 1518 | struct GNUNET_MessageHeader * |
1519 | msg = GNUNET_CONTAINER_multihashmap_get (places, key); | 1519 | msg = GNUNET_CONTAINER_multihashmap_get (places, key); |
@@ -1648,7 +1648,7 @@ handle_client_host_enter (void *cls, | |||
1648 | struct HostEnterRequest * | 1648 | struct HostEnterRequest * |
1649 | hreq = (struct HostEnterRequest *) GNUNET_copy_message (&hr->header); | 1649 | hreq = (struct HostEnterRequest *) GNUNET_copy_message (&hr->header); |
1650 | 1650 | ||
1651 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1651 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1652 | "handle_client_host_enter\n"); | 1652 | "handle_client_host_enter\n"); |
1653 | 1653 | ||
1654 | uint8_t app_id_size = ntohs (hreq->header.size) - sizeof (*hreq); | 1654 | uint8_t app_id_size = ntohs (hreq->header.size) - sizeof (*hreq); |
@@ -1705,7 +1705,7 @@ handle_client_host_enter (void *cls, | |||
1705 | if (ret != GNUNET_SYSERR) | 1705 | if (ret != GNUNET_SYSERR) |
1706 | { | 1706 | { |
1707 | 1707 | ||
1708 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1708 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1709 | "%p Client connected as host to place %s.\n", | 1709 | "%p Client connected as host to place %s.\n", |
1710 | hst, GNUNET_h2s (&plc->pub_key_hash)); | 1710 | hst, GNUNET_h2s (&plc->pub_key_hash)); |
1711 | 1711 | ||
@@ -1767,7 +1767,7 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) | |||
1767 | if (NULL != plc_gst) | 1767 | if (NULL != plc_gst) |
1768 | gst = GNUNET_CONTAINER_multihashmap_get (plc_gst, &ego_pub_hash); | 1768 | gst = GNUNET_CONTAINER_multihashmap_get (plc_gst, &ego_pub_hash); |
1769 | 1769 | ||
1770 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1770 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1771 | "guest enter, gst = %p\n", | 1771 | "guest enter, gst = %p\n", |
1772 | gst); | 1772 | gst); |
1773 | 1773 | ||
@@ -1808,7 +1808,7 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) | |||
1808 | struct GNUNET_PSYC_Message *join_msg = NULL; | 1808 | struct GNUNET_PSYC_Message *join_msg = NULL; |
1809 | uint16_t join_msg_size = 0; | 1809 | uint16_t join_msg_size = 0; |
1810 | 1810 | ||
1811 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1811 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1812 | "guest_enter 2\n"); | 1812 | "guest_enter 2\n"); |
1813 | 1813 | ||
1814 | if (sizeof (struct GNUNET_MessageHeader) <= remaining) | 1814 | if (sizeof (struct GNUNET_MessageHeader) <= remaining) |
@@ -1850,14 +1850,14 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) | |||
1850 | (void) GNUNET_CONTAINER_multihashmap_put (place_guests, &plc->pub_key_hash, plc_gst, | 1850 | (void) GNUNET_CONTAINER_multihashmap_put (place_guests, &plc->pub_key_hash, plc_gst, |
1851 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); | 1851 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); |
1852 | } | 1852 | } |
1853 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1853 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1854 | "Adding guest %p\n", | 1854 | "Adding guest %p\n", |
1855 | gst); | 1855 | gst); |
1856 | (void) GNUNET_CONTAINER_multihashmap_put (plc_gst, &plc->ego_pub_hash, gst, | 1856 | (void) GNUNET_CONTAINER_multihashmap_put (plc_gst, &plc->ego_pub_hash, gst, |
1857 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); | 1857 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); |
1858 | (void) GNUNET_CONTAINER_multihashmap_put (guests, &plc->pub_key_hash, gst, | 1858 | (void) GNUNET_CONTAINER_multihashmap_put (guests, &plc->pub_key_hash, gst, |
1859 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); | 1859 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); |
1860 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1860 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1861 | "GNUNET_PSYC_slave_join\n"); | 1861 | "GNUNET_PSYC_slave_join\n"); |
1862 | gst->slave | 1862 | gst->slave |
1863 | = GNUNET_PSYC_slave_join (cfg, &plc->pub_key, &plc->ego_key, | 1863 | = GNUNET_PSYC_slave_join (cfg, &plc->pub_key, &plc->ego_key, |
@@ -1883,7 +1883,7 @@ client_guest_enter (struct Client *c, | |||
1883 | { | 1883 | { |
1884 | struct GNUNET_SERVICE_Client *client = c->client; | 1884 | struct GNUNET_SERVICE_Client *client = c->client; |
1885 | 1885 | ||
1886 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1886 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1887 | "handle_client_guest_enter\n"); | 1887 | "handle_client_guest_enter\n"); |
1888 | 1888 | ||
1889 | uint16_t remaining = ntohs (greq->header.size) - sizeof (*greq); | 1889 | uint16_t remaining = ntohs (greq->header.size) - sizeof (*greq); |
@@ -1989,7 +1989,7 @@ gns_result_guest_enter (void *cls, uint32_t rd_count, | |||
1989 | { | 1989 | { |
1990 | struct GuestEnterByNameClosure *gcls = cls; | 1990 | struct GuestEnterByNameClosure *gcls = cls; |
1991 | struct Client *c = gcls->client; | 1991 | struct Client *c = gcls->client; |
1992 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1992 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1993 | "%p GNS result: %u records.\n", | 1993 | "%p GNS result: %u records.\n", |
1994 | c, rd_count); | 1994 | c, rd_count); |
1995 | 1995 | ||
@@ -2155,7 +2155,7 @@ handle_client_app_connect (void *cls, | |||
2155 | struct GNUNET_HashCode app_id_hash; | 2155 | struct GNUNET_HashCode app_id_hash; |
2156 | GNUNET_CRYPTO_hash (app_id, app_id_size, &app_id_hash); | 2156 | GNUNET_CRYPTO_hash (app_id, app_id_size, &app_id_hash); |
2157 | 2157 | ||
2158 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 2158 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
2159 | "iterating egos\n"); | 2159 | "iterating egos\n"); |
2160 | GNUNET_CONTAINER_multihashmap_iterate (egos, ego_entry, client); | 2160 | GNUNET_CONTAINER_multihashmap_iterate (egos, ego_entry, client); |
2161 | app_notify_ego_end (client); | 2161 | app_notify_ego_end (client); |
@@ -2225,7 +2225,7 @@ handle_client_place_leave (void *cls, | |||
2225 | struct GNUNET_SERVICE_Client *client = c->client; | 2225 | struct GNUNET_SERVICE_Client *client = c->client; |
2226 | struct Place *plc = c->place; | 2226 | struct Place *plc = c->place; |
2227 | 2227 | ||
2228 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 2228 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
2229 | "handle_client_place_leave\n"); | 2229 | "handle_client_place_leave\n"); |
2230 | 2230 | ||
2231 | if (NULL == plc) | 2231 | if (NULL == plc) |
@@ -3240,7 +3240,7 @@ handle_client_state_get (void *cls, | |||
3240 | uint16_t size = ntohs (req->header.size); | 3240 | uint16_t size = ntohs (req->header.size); |
3241 | const char *name = (const char *) &req[1]; | 3241 | const char *name = (const char *) &req[1]; |
3242 | 3242 | ||
3243 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 3243 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
3244 | "%p State get #%" PRIu64 ": %s\n", | 3244 | "%p State get #%" PRIu64 ": %s\n", |
3245 | plc, GNUNET_ntohll (req->op_id), name); | 3245 | plc, GNUNET_ntohll (req->op_id), name); |
3246 | 3246 | ||
@@ -3293,7 +3293,7 @@ namestore_recv_records_store_result (void *cls, int32_t result, | |||
3293 | struct OperationClosure *opcls = cls; | 3293 | struct OperationClosure *opcls = cls; |
3294 | struct Client *c = opcls->client; | 3294 | struct Client *c = opcls->client; |
3295 | 3295 | ||
3296 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 3296 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
3297 | "namestore_recv_records_store_result\n"); | 3297 | "namestore_recv_records_store_result\n"); |
3298 | // FIXME: client might have been disconnected | 3298 | // FIXME: client might have been disconnected |
3299 | client_send_result (c->client, opcls->op_id, result, err_msg, | 3299 | client_send_result (c->client, opcls->op_id, result, err_msg, |
@@ -3584,7 +3584,7 @@ identity_recv_ego (void *cls, struct GNUNET_IDENTITY_Ego *id_ego, | |||
3584 | if (NULL == id_ego) // end of initial list of egos | 3584 | if (NULL == id_ego) // end of initial list of egos |
3585 | return; | 3585 | return; |
3586 | 3586 | ||
3587 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 3587 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
3588 | "social service received ego %s\n", | 3588 | "social service received ego %s\n", |
3589 | name); | 3589 | name); |
3590 | 3590 | ||
@@ -3636,7 +3636,7 @@ run (void *cls, | |||
3636 | const struct GNUNET_CONFIGURATION_Handle *c, | 3636 | const struct GNUNET_CONFIGURATION_Handle *c, |
3637 | struct GNUNET_SERVICE_Handle *svc) | 3637 | struct GNUNET_SERVICE_Handle *svc) |
3638 | { | 3638 | { |
3639 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 3639 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
3640 | "starting social service\n"); | 3640 | "starting social service\n"); |
3641 | 3641 | ||
3642 | cfg = c; | 3642 | cfg = c; |
diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c index 0e52dccfa..0de8809ff 100644 --- a/src/social/gnunet-social.c +++ b/src/social/gnunet-social.c | |||
@@ -283,7 +283,7 @@ exit_fail () | |||
283 | static void | 283 | static void |
284 | host_left () | 284 | host_left () |
285 | { | 285 | { |
286 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 286 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
287 | "The host has left the place.\n"); | 287 | "The host has left the place.\n"); |
288 | exit_success (); | 288 | exit_success (); |
289 | } | 289 | } |
@@ -309,7 +309,7 @@ host_leave () | |||
309 | static void | 309 | static void |
310 | guest_left (void *cls) | 310 | guest_left (void *cls) |
311 | { | 311 | { |
312 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 312 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
313 | "Guest has left the place.\n"); | 313 | "Guest has left the place.\n"); |
314 | } | 314 | } |
315 | 315 | ||
@@ -518,7 +518,7 @@ look_var (void *cls, | |||
518 | uint32_t value_size, | 518 | uint32_t value_size, |
519 | uint32_t full_value_size) | 519 | uint32_t full_value_size) |
520 | { | 520 | { |
521 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 521 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
522 | "Received var: %s\n%.*s\n", | 522 | "Received var: %s\n%.*s\n", |
523 | name, value_size, (const char *) value); | 523 | name, value_size, (const char *) value); |
524 | } | 524 | } |
@@ -558,7 +558,7 @@ slicer_recv_method (void *cls, | |||
558 | const char *method_name) | 558 | const char *method_name) |
559 | { | 559 | { |
560 | method_received = method_name; | 560 | method_received = method_name; |
561 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 561 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
562 | "Received method for message ID %" PRIu64 ":\n" | 562 | "Received method for message ID %" PRIu64 ":\n" |
563 | "%s (flags: %x)\n", | 563 | "%s (flags: %x)\n", |
564 | message_id, method_name, ntohl (meth->flags)); | 564 | message_id, method_name, ntohl (meth->flags)); |
@@ -584,7 +584,7 @@ slicer_recv_modifier (void *cls, | |||
584 | uint16_t full_value_size) | 584 | uint16_t full_value_size) |
585 | { | 585 | { |
586 | #if 0 | 586 | #if 0 |
587 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 587 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
588 | "Received modifier for message ID %" PRIu64 ":\n" | 588 | "Received modifier for message ID %" PRIu64 ":\n" |
589 | "%c%s: %.*s (size: %u)\n", | 589 | "%c%s: %.*s (size: %u)\n", |
590 | message_id, oper, name, value_size, (const char *) value, value_size); | 590 | message_id, oper, name, value_size, (const char *) value, value_size); |
@@ -608,7 +608,7 @@ slicer_recv_data (void *cls, | |||
608 | uint16_t data_size) | 608 | uint16_t data_size) |
609 | { | 609 | { |
610 | #if 0 | 610 | #if 0 |
611 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 611 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
612 | "Received data for message ID %" PRIu64 ":\n" | 612 | "Received data for message ID %" PRIu64 ":\n" |
613 | "%.*s\n", | 613 | "%.*s\n", |
614 | message_id, data_size, (const char *) data); | 614 | message_id, data_size, (const char *) data); |
@@ -631,7 +631,7 @@ slicer_recv_eom (void *cls, | |||
631 | uint8_t is_cancelled) | 631 | uint8_t is_cancelled) |
632 | { | 632 | { |
633 | printf(".\n"); | 633 | printf(".\n"); |
634 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 634 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
635 | "Received end of message ID %" PRIu64 | 635 | "Received end of message ID %" PRIu64 |
636 | ", cancelled: %u\n", | 636 | ", cancelled: %u\n", |
637 | message_id, is_cancelled); | 637 | message_id, is_cancelled); |
@@ -668,7 +668,7 @@ guest_recv_entry_decision (void *cls, | |||
668 | int is_admitted, | 668 | int is_admitted, |
669 | const struct GNUNET_PSYC_Message *entry_msg) | 669 | const struct GNUNET_PSYC_Message *entry_msg) |
670 | { | 670 | { |
671 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 671 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
672 | "Guest received entry decision %d\n", | 672 | "Guest received entry decision %d\n", |
673 | is_admitted); | 673 | is_admitted); |
674 | 674 | ||
@@ -683,7 +683,7 @@ guest_recv_entry_decision (void *cls, | |||
683 | GNUNET_PSYC_message_parse (pmsg, &method_name, env, &data, &data_size); | 683 | GNUNET_PSYC_message_parse (pmsg, &method_name, env, &data, &data_size); |
684 | GNUNET_free (pmsg); | 684 | GNUNET_free (pmsg); |
685 | 685 | ||
686 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 686 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
687 | "%s\n%.*s\n", | 687 | "%s\n%.*s\n", |
688 | method_name, data_size, (const char *) data); | 688 | method_name, data_size, (const char *) data); |
689 | } | 689 | } |
@@ -704,7 +704,7 @@ guest_recv_local_enter (void *cls, int result, | |||
704 | uint64_t max_message_id) | 704 | uint64_t max_message_id) |
705 | { | 705 | { |
706 | char *pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (pub_key); | 706 | char *pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (pub_key); |
707 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 707 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
708 | "Guest entered local place: %s, max_message_id: %" PRIu64 "\n", | 708 | "Guest entered local place: %s, max_message_id: %" PRIu64 "\n", |
709 | pub_str, max_message_id); | 709 | pub_str, max_message_id); |
710 | GNUNET_free (pub_str); | 710 | GNUNET_free (pub_str); |
@@ -802,7 +802,7 @@ host_answer_door (void *cls, | |||
802 | char * | 802 | char * |
803 | nym_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key); | 803 | nym_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key); |
804 | 804 | ||
805 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 805 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
806 | "Entry request: %s\n", nym_str); | 806 | "Entry request: %s\n", nym_str); |
807 | GNUNET_free (nym_str); | 807 | GNUNET_free (nym_str); |
808 | 808 | ||
@@ -840,7 +840,7 @@ host_farewell (void *cls, | |||
840 | char * | 840 | char * |
841 | nym_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key); | 841 | nym_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key); |
842 | 842 | ||
843 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 843 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
844 | "Farewell: %s\n", nym_str); | 844 | "Farewell: %s\n", nym_str); |
845 | GNUNET_free (nym_str); | 845 | GNUNET_free (nym_str); |
846 | } | 846 | } |
@@ -856,7 +856,7 @@ host_entered (void *cls, int result, | |||
856 | { | 856 | { |
857 | place_pub_key = *pub_key; | 857 | place_pub_key = *pub_key; |
858 | char *pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (pub_key); | 858 | char *pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (pub_key); |
859 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 859 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
860 | "Host entered: %s, max_message_id: %" PRIu64 "\n", | 860 | "Host entered: %s, max_message_id: %" PRIu64 "\n", |
861 | pub_str, max_message_id); | 861 | pub_str, max_message_id); |
862 | GNUNET_free (pub_str); | 862 | GNUNET_free (pub_str); |
diff --git a/src/social/test_social.c b/src/social/test_social.c index 505780a69..8d49e7413 100644 --- a/src/social/test_social.c +++ b/src/social/test_social.c | |||
@@ -244,7 +244,7 @@ end_normally (void *cls) | |||
244 | { | 244 | { |
245 | res = 0; | 245 | res = 0; |
246 | cleanup (); | 246 | cleanup (); |
247 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test PASSED.\n"); | 247 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test PASSED.\n"); |
248 | } | 248 | } |
249 | 249 | ||
250 | 250 | ||
@@ -254,7 +254,7 @@ end_normally (void *cls) | |||
254 | static void | 254 | static void |
255 | end () | 255 | end () |
256 | { | 256 | { |
257 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 257 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
258 | "Test #%u: Ending tests.\n", test); | 258 | "Test #%u: Ending tests.\n", test); |
259 | 259 | ||
260 | if (end_badly_task != NULL) | 260 | if (end_badly_task != NULL) |
@@ -271,7 +271,7 @@ transmit_resume (void *cls) | |||
271 | { | 271 | { |
272 | struct TransmitClosure *tmit = cls; | 272 | struct TransmitClosure *tmit = cls; |
273 | 273 | ||
274 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 274 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
275 | "Test #%u: Transmission resumed.\n", test); | 275 | "Test #%u: Transmission resumed.\n", test); |
276 | if (NULL != tmit->host_ann) | 276 | if (NULL != tmit->host_ann) |
277 | GNUNET_SOCIAL_host_announce_resume (tmit->host_ann); | 277 | GNUNET_SOCIAL_host_announce_resume (tmit->host_ann); |
@@ -296,7 +296,7 @@ notify_data (void *cls, uint16_t *data_size, void *data) | |||
296 | } | 296 | } |
297 | 297 | ||
298 | uint16_t size = strlen (tmit->data[tmit->n]); | 298 | uint16_t size = strlen (tmit->data[tmit->n]); |
299 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 299 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
300 | "Test #%u: Transmit notify data: %u bytes available, " | 300 | "Test #%u: Transmit notify data: %u bytes available, " |
301 | "processing fragment %u/%u (size %u).\n", | 301 | "processing fragment %u/%u (size %u).\n", |
302 | test, *data_size, tmit->n + 1, tmit->data_count, size); | 302 | test, *data_size, tmit->n + 1, tmit->data_count, size); |
@@ -309,7 +309,7 @@ notify_data (void *cls, uint16_t *data_size, void *data) | |||
309 | 309 | ||
310 | if (GNUNET_YES != tmit->paused && 0 < tmit->data_delay[tmit->n]) | 310 | if (GNUNET_YES != tmit->paused && 0 < tmit->data_delay[tmit->n]) |
311 | { | 311 | { |
312 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 312 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
313 | "Test #%u: Transmission paused.\n", test); | 313 | "Test #%u: Transmission paused.\n", test); |
314 | tmit->paused = GNUNET_YES; | 314 | tmit->paused = GNUNET_YES; |
315 | GNUNET_SCHEDULER_add_delayed ( | 315 | GNUNET_SCHEDULER_add_delayed ( |
@@ -331,7 +331,7 @@ notify_data (void *cls, uint16_t *data_size, void *data) | |||
331 | static void | 331 | static void |
332 | host_left () | 332 | host_left () |
333 | { | 333 | { |
334 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 334 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
335 | "Test #%u: The host has left the place.\n", test); | 335 | "Test #%u: The host has left the place.\n", test); |
336 | end (); | 336 | end (); |
337 | } | 337 | } |
@@ -365,7 +365,7 @@ host_reconnected (void *cls, int result, | |||
365 | { | 365 | { |
366 | place_pub_key = *home_pub_key; | 366 | place_pub_key = *home_pub_key; |
367 | GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash); | 367 | GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash); |
368 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 368 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
369 | "Test #%u: Host reconnected to place %s\n", | 369 | "Test #%u: Host reconnected to place %s\n", |
370 | test, GNUNET_h2s (&place_pub_hash)); | 370 | test, GNUNET_h2s (&place_pub_hash)); |
371 | 371 | ||
@@ -382,7 +382,7 @@ guest_reconnected (void *cls, int result, | |||
382 | const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, | 382 | const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, |
383 | uint64_t max_message_id) | 383 | uint64_t max_message_id) |
384 | { | 384 | { |
385 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 385 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
386 | "Test #%u: Guest reconnected to place: %d\n", | 386 | "Test #%u: Guest reconnected to place: %d\n", |
387 | test, result); | 387 | test, result); |
388 | GNUNET_assert (0 <= result); | 388 | GNUNET_assert (0 <= result); |
@@ -398,7 +398,7 @@ guest_reconnected (void *cls, int result, | |||
398 | static void | 398 | static void |
399 | app_connected (void *cls) | 399 | app_connected (void *cls) |
400 | { | 400 | { |
401 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 401 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
402 | "Test #%u: App connected: %p\n", test, cls); | 402 | "Test #%u: App connected: %p\n", test, cls); |
403 | } | 403 | } |
404 | 404 | ||
@@ -413,7 +413,7 @@ app_recv_host (void *cls, | |||
413 | struct GNUNET_HashCode host_pub_hash; | 413 | struct GNUNET_HashCode host_pub_hash; |
414 | GNUNET_CRYPTO_hash (host_pub_key, sizeof (*host_pub_key), &host_pub_hash); | 414 | GNUNET_CRYPTO_hash (host_pub_key, sizeof (*host_pub_key), &host_pub_hash); |
415 | 415 | ||
416 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 416 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
417 | "Test #%u: Got app host place notification: %s\n", | 417 | "Test #%u: Got app host place notification: %s\n", |
418 | test, GNUNET_h2s (&host_pub_hash)); | 418 | test, GNUNET_h2s (&host_pub_hash)); |
419 | 419 | ||
@@ -421,7 +421,7 @@ app_recv_host (void *cls, | |||
421 | { | 421 | { |
422 | if (0 == memcmp (&place_pub_key, host_pub_key, sizeof (*host_pub_key))) | 422 | if (0 == memcmp (&place_pub_key, host_pub_key, sizeof (*host_pub_key))) |
423 | { | 423 | { |
424 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 424 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
425 | "Test #%u: Reconnecting to host place: %s\n", | 425 | "Test #%u: Reconnecting to host place: %s\n", |
426 | test, GNUNET_h2s (&host_pub_hash)); | 426 | test, GNUNET_h2s (&host_pub_hash)); |
427 | hst = GNUNET_SOCIAL_host_enter_reconnect (hconn, host_slicer, host_reconnected, | 427 | hst = GNUNET_SOCIAL_host_enter_reconnect (hconn, host_slicer, host_reconnected, |
@@ -441,7 +441,7 @@ app_recv_guest (void *cls, | |||
441 | struct GNUNET_HashCode guest_pub_hash; | 441 | struct GNUNET_HashCode guest_pub_hash; |
442 | GNUNET_CRYPTO_hash (guest_pub_key, sizeof (*guest_pub_key), &guest_pub_hash); | 442 | GNUNET_CRYPTO_hash (guest_pub_key, sizeof (*guest_pub_key), &guest_pub_hash); |
443 | 443 | ||
444 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 444 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
445 | "Test #%u: Got app guest place notification: %s\n", | 445 | "Test #%u: Got app guest place notification: %s\n", |
446 | test, GNUNET_h2s (&guest_pub_hash)); | 446 | test, GNUNET_h2s (&guest_pub_hash)); |
447 | 447 | ||
@@ -449,7 +449,7 @@ app_recv_guest (void *cls, | |||
449 | { | 449 | { |
450 | if (0 == memcmp (&place_pub_key, guest_pub_key, sizeof (*guest_pub_key))) | 450 | if (0 == memcmp (&place_pub_key, guest_pub_key, sizeof (*guest_pub_key))) |
451 | { | 451 | { |
452 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 452 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
453 | "Test #%u: Reconnecting to guest place: %s\n", | 453 | "Test #%u: Reconnecting to guest place: %s\n", |
454 | test, GNUNET_h2s (&guest_pub_hash)); | 454 | test, GNUNET_h2s (&guest_pub_hash)); |
455 | gst = GNUNET_SOCIAL_guest_enter_reconnect (gconn, GNUNET_PSYC_SLAVE_JOIN_NONE, | 455 | gst = GNUNET_SOCIAL_guest_enter_reconnect (gconn, GNUNET_PSYC_SLAVE_JOIN_NONE, |
@@ -478,7 +478,7 @@ app_recv_ego (void *cls, | |||
478 | const char *name) | 478 | const char *name) |
479 | { | 479 | { |
480 | char *ego_pub_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key); | 480 | char *ego_pub_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key); |
481 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 481 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
482 | "Test #%u: Got app ego notification: %p %s %s\n", | 482 | "Test #%u: Got app ego notification: %p %s %s\n", |
483 | test, ego, name, ego_pub_str); | 483 | test, ego, name, ego_pub_str); |
484 | GNUNET_free (ego_pub_str); | 484 | GNUNET_free (ego_pub_str); |
@@ -506,7 +506,7 @@ app_recv_ego (void *cls, | |||
506 | } | 506 | } |
507 | else | 507 | else |
508 | { | 508 | { |
509 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 509 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
510 | "test = %d\n", | 510 | "test = %d\n", |
511 | test); | 511 | test); |
512 | GNUNET_assert (TEST_RECONNECT == test); | 512 | GNUNET_assert (TEST_RECONNECT == test); |
@@ -539,7 +539,7 @@ static void | |||
539 | host_recv_zone_add_place_result (void *cls, int64_t result, | 539 | host_recv_zone_add_place_result (void *cls, int64_t result, |
540 | const void *data, uint16_t data_size) | 540 | const void *data, uint16_t data_size) |
541 | { | 541 | { |
542 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 542 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
543 | "Test #%u: Zone add place result: %" PRId64 " (%.*s).\n", | 543 | "Test #%u: Zone add place result: %" PRId64 " (%.*s).\n", |
544 | test, result, data_size, (const char *) data); | 544 | test, result, data_size, (const char *) data); |
545 | GNUNET_assert (GNUNET_YES == result); | 545 | GNUNET_assert (GNUNET_YES == result); |
@@ -553,7 +553,7 @@ static void | |||
553 | zone_add_place () | 553 | zone_add_place () |
554 | { | 554 | { |
555 | test = TEST_ZONE_ADD_PLACE; | 555 | test = TEST_ZONE_ADD_PLACE; |
556 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 556 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
557 | "Test #%u: Adding place to zone.\n", test); | 557 | "Test #%u: Adding place to zone.\n", test); |
558 | 558 | ||
559 | GNUNET_SOCIAL_zone_add_place (app, host_ego, "home", "let.me*in!", | 559 | GNUNET_SOCIAL_zone_add_place (app, host_ego, "home", "let.me*in!", |
@@ -572,7 +572,7 @@ host_farewell (void *cls, | |||
572 | nym_key = GNUNET_SOCIAL_nym_get_pub_key (nym); | 572 | nym_key = GNUNET_SOCIAL_nym_get_pub_key (nym); |
573 | 573 | ||
574 | char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key); | 574 | char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key); |
575 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 575 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
576 | "Test #%u: Farewell: nym %s (%s) has left the place.\n", | 576 | "Test #%u: Farewell: nym %s (%s) has left the place.\n", |
577 | test, GNUNET_h2s (GNUNET_SOCIAL_nym_get_pub_key_hash (nym)), str); | 577 | test, GNUNET_h2s (GNUNET_SOCIAL_nym_get_pub_key_hash (nym)), str); |
578 | GNUNET_free (str); | 578 | GNUNET_free (str); |
@@ -593,7 +593,7 @@ host_farewell (void *cls, | |||
593 | static void | 593 | static void |
594 | guest_left (void *cls) | 594 | guest_left (void *cls) |
595 | { | 595 | { |
596 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 596 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
597 | "Test #%u: The guest has left the place.\n", test); | 597 | "Test #%u: The guest has left the place.\n", test); |
598 | } | 598 | } |
599 | 599 | ||
@@ -630,7 +630,7 @@ guest_look_for_result (void *cls, | |||
630 | uint16_t data_size) | 630 | uint16_t data_size) |
631 | { | 631 | { |
632 | struct ResultClosure *rcls = cls; | 632 | struct ResultClosure *rcls = cls; |
633 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 633 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
634 | "Test #%u: guest_look_for_result: %" PRId64 "\n", | 634 | "Test #%u: guest_look_for_result: %" PRId64 "\n", |
635 | test, result_code); | 635 | test, result_code); |
636 | GNUNET_assert (GNUNET_OK == result_code); | 636 | GNUNET_assert (GNUNET_OK == result_code); |
@@ -650,7 +650,7 @@ guest_look_for_var (void *cls, | |||
650 | { | 650 | { |
651 | struct ResultClosure *rcls = cls; | 651 | struct ResultClosure *rcls = cls; |
652 | rcls->n++; | 652 | rcls->n++; |
653 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 653 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
654 | "Test #%u: guest_look_for_var: %s\n%.*s\n", | 654 | "Test #%u: guest_look_for_var: %s\n%.*s\n", |
655 | test, name, value_size, (const char *) value); | 655 | test, name, value_size, (const char *) value); |
656 | } | 656 | } |
@@ -671,7 +671,7 @@ guest_look_at_result (void *cls, int64_t result_code, | |||
671 | { | 671 | { |
672 | struct ResultClosure *rcls = cls; | 672 | struct ResultClosure *rcls = cls; |
673 | 673 | ||
674 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 674 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
675 | "Test #%u: guest_look_at_result: %" PRId64 "\n", | 675 | "Test #%u: guest_look_at_result: %" PRId64 "\n", |
676 | test, result_code); | 676 | test, result_code); |
677 | GNUNET_assert (GNUNET_OK == result_code); | 677 | GNUNET_assert (GNUNET_OK == result_code); |
@@ -692,7 +692,7 @@ guest_look_at_var (void *cls, | |||
692 | struct ResultClosure *rcls = cls; | 692 | struct ResultClosure *rcls = cls; |
693 | rcls->n++; | 693 | rcls->n++; |
694 | 694 | ||
695 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 695 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
696 | "Test #%u: guest_look_at_var: %s\n%.*s\n", | 696 | "Test #%u: guest_look_at_var: %s\n%.*s\n", |
697 | test ,name, value_size, (const char *) value); | 697 | test ,name, value_size, (const char *) value); |
698 | } | 698 | } |
@@ -711,7 +711,7 @@ static void | |||
711 | guest_recv_history_replay_latest_result (void *cls, int64_t result, | 711 | guest_recv_history_replay_latest_result (void *cls, int64_t result, |
712 | const void *data, uint16_t data_size) | 712 | const void *data, uint16_t data_size) |
713 | { | 713 | { |
714 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 714 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
715 | "Test #%u: Guest received latest history replay result " | 715 | "Test #%u: Guest received latest history replay result " |
716 | "(%" PRIu32 " messages, %" PRId64 " fragments):\n" | 716 | "(%" PRIu32 " messages, %" PRId64 " fragments):\n" |
717 | "%.*s\n", | 717 | "%.*s\n", |
@@ -740,7 +740,7 @@ static void | |||
740 | guest_recv_history_replay_result (void *cls, int64_t result, | 740 | guest_recv_history_replay_result (void *cls, int64_t result, |
741 | const void *data, uint16_t data_size) | 741 | const void *data, uint16_t data_size) |
742 | { | 742 | { |
743 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 743 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
744 | "Test #%u: Guest received history replay result: %" PRId64 "\n" | 744 | "Test #%u: Guest received history replay result: %" PRId64 "\n" |
745 | "%.*s\n", | 745 | "%.*s\n", |
746 | test, result, data_size, (const char *) data); | 746 | test, result, data_size, (const char *) data); |
@@ -771,7 +771,7 @@ guest_recv_method (void *cls, | |||
771 | uint64_t message_id, | 771 | uint64_t message_id, |
772 | const char *method_name) | 772 | const char *method_name) |
773 | { | 773 | { |
774 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 774 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
775 | "Test #%u: Guest received method for message ID %" PRIu64 ":\n" | 775 | "Test #%u: Guest received method for message ID %" PRIu64 ":\n" |
776 | "%s (flags: %x)\n", | 776 | "%s (flags: %x)\n", |
777 | test, message_id, method_name, ntohl (meth->flags)); | 777 | test, message_id, method_name, ntohl (meth->flags)); |
@@ -790,7 +790,7 @@ guest_recv_modifier (void *cls, | |||
790 | uint16_t value_size, | 790 | uint16_t value_size, |
791 | uint16_t full_value_size) | 791 | uint16_t full_value_size) |
792 | { | 792 | { |
793 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 793 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
794 | "Test #%u: Guest received modifier for message ID %" PRIu64 ":\n" | 794 | "Test #%u: Guest received modifier for message ID %" PRIu64 ":\n" |
795 | "%c%s: %.*s (size: %u)\n", | 795 | "%c%s: %.*s (size: %u)\n", |
796 | test, message_id, oper, name, value_size, (const char *) value, value_size); | 796 | test, message_id, oper, name, value_size, (const char *) value, value_size); |
@@ -808,7 +808,7 @@ guest_recv_mod_foo_bar (void *cls, | |||
808 | uint16_t value_size, | 808 | uint16_t value_size, |
809 | uint16_t full_value_size) | 809 | uint16_t full_value_size) |
810 | { | 810 | { |
811 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 811 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
812 | "Test #%u: Guest received modifier matching _foo_bar for message ID %" PRIu64 ":\n" | 812 | "Test #%u: Guest received modifier matching _foo_bar for message ID %" PRIu64 ":\n" |
813 | "%c%s: %.*s (size: %u)\n", | 813 | "%c%s: %.*s (size: %u)\n", |
814 | test, message_id, oper, name, value_size, (const char *) value, value_size); | 814 | test, message_id, oper, name, value_size, (const char *) value, value_size); |
@@ -826,7 +826,7 @@ guest_recv_data (void *cls, | |||
826 | const void *data, | 826 | const void *data, |
827 | uint16_t data_size) | 827 | uint16_t data_size) |
828 | { | 828 | { |
829 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 829 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
830 | "Test #%u: Guest received data for message ID %" PRIu64 ":\n" | 830 | "Test #%u: Guest received data for message ID %" PRIu64 ":\n" |
831 | "%.*s\n", | 831 | "%.*s\n", |
832 | test, message_id, data_size, (const char *) data); | 832 | test, message_id, data_size, (const char *) data); |
@@ -841,7 +841,7 @@ guest_recv_eom (void *cls, | |||
841 | uint64_t message_id, | 841 | uint64_t message_id, |
842 | uint8_t is_cancelled) | 842 | uint8_t is_cancelled) |
843 | { | 843 | { |
844 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 844 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
845 | "Test #%u: Guest received end of message ID %" PRIu64 | 845 | "Test #%u: Guest received end of message ID %" PRIu64 |
846 | ", cancelled: %u\n", | 846 | ", cancelled: %u\n", |
847 | test, message_id, is_cancelled); | 847 | test, message_id, is_cancelled); |
@@ -883,7 +883,7 @@ host_recv_method (void *cls, | |||
883 | uint64_t message_id, | 883 | uint64_t message_id, |
884 | const char *method_name) | 884 | const char *method_name) |
885 | { | 885 | { |
886 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 886 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
887 | "Test #%u: Host received method for message ID %" PRIu64 ":\n" | 887 | "Test #%u: Host received method for message ID %" PRIu64 ":\n" |
888 | "%s\n", | 888 | "%s\n", |
889 | test, message_id, method_name); | 889 | test, message_id, method_name); |
@@ -902,7 +902,7 @@ host_recv_modifier (void *cls, | |||
902 | uint16_t value_size, | 902 | uint16_t value_size, |
903 | uint16_t full_value_size) | 903 | uint16_t full_value_size) |
904 | { | 904 | { |
905 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 905 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
906 | "Test #%u: Host received modifier for message ID %" PRIu64 ":\n" | 906 | "Test #%u: Host received modifier for message ID %" PRIu64 ":\n" |
907 | "%c%s: %.*s\n", | 907 | "%c%s: %.*s\n", |
908 | test, message_id, oper, name, value_size, (const char *) value); | 908 | test, message_id, oper, name, value_size, (const char *) value); |
@@ -917,7 +917,7 @@ host_recv_data (void *cls, | |||
917 | const void *data, | 917 | const void *data, |
918 | uint16_t data_size) | 918 | uint16_t data_size) |
919 | { | 919 | { |
920 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 920 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
921 | "Test #%u: Host received data for message ID %" PRIu64 ":\n" | 921 | "Test #%u: Host received data for message ID %" PRIu64 ":\n" |
922 | "%.*s\n", | 922 | "%.*s\n", |
923 | test, message_id, data_size, (const char *) data); | 923 | test, message_id, data_size, (const char *) data); |
@@ -931,7 +931,7 @@ host_recv_eom (void *cls, | |||
931 | uint64_t message_id, | 931 | uint64_t message_id, |
932 | uint8_t is_cancelled) | 932 | uint8_t is_cancelled) |
933 | { | 933 | { |
934 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 934 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
935 | "Test #%u: Host received end of message ID %" PRIu64 | 935 | "Test #%u: Host received end of message ID %" PRIu64 |
936 | ", cancelled: %u\n", | 936 | ", cancelled: %u\n", |
937 | test, message_id, is_cancelled); | 937 | test, message_id, is_cancelled); |
@@ -996,7 +996,7 @@ host_announce () | |||
996 | { | 996 | { |
997 | test = TEST_HOST_ANNOUNCE; | 997 | test = TEST_HOST_ANNOUNCE; |
998 | 998 | ||
999 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 999 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1000 | "Test #%u: Host announcement.\n", test); | 1000 | "Test #%u: Host announcement.\n", test); |
1001 | 1001 | ||
1002 | tmit = (struct TransmitClosure) {}; | 1002 | tmit = (struct TransmitClosure) {}; |
@@ -1030,7 +1030,7 @@ host_announce2 () | |||
1030 | 1030 | ||
1031 | test = TEST_HOST_ANNOUNCE2; | 1031 | test = TEST_HOST_ANNOUNCE2; |
1032 | 1032 | ||
1033 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1033 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1034 | "Test #%u: Host announcement 2.\n", test); | 1034 | "Test #%u: Host announcement 2.\n", test); |
1035 | 1035 | ||
1036 | tmit = (struct TransmitClosure) {}; | 1036 | tmit = (struct TransmitClosure) {}; |
@@ -1058,7 +1058,7 @@ guest_recv_entry_decision (void *cls, | |||
1058 | int is_admitted, | 1058 | int is_admitted, |
1059 | const struct GNUNET_PSYC_Message *entry_msg) | 1059 | const struct GNUNET_PSYC_Message *entry_msg) |
1060 | { | 1060 | { |
1061 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1061 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1062 | "Test #%u: Guest received entry decision (try %u): %d.\n", | 1062 | "Test #%u: Guest received entry decision (try %u): %d.\n", |
1063 | test, join_req_count, is_admitted); | 1063 | test, join_req_count, is_admitted); |
1064 | 1064 | ||
@@ -1112,7 +1112,7 @@ host_answer_door (void *cls, | |||
1112 | { | 1112 | { |
1113 | join_req_count++; | 1113 | join_req_count++; |
1114 | 1114 | ||
1115 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1115 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1116 | "Test #%u: Host received entry request from guest (try %u).\n", | 1116 | "Test #%u: Host received entry request from guest (try %u).\n", |
1117 | (uint8_t) test, join_req_count); | 1117 | (uint8_t) test, join_req_count); |
1118 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1118 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1150,8 +1150,8 @@ guest_recv_local_enter (void *cls, int result, | |||
1150 | const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, | 1150 | const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, |
1151 | uint64_t max_message_id) | 1151 | uint64_t max_message_id) |
1152 | { | 1152 | { |
1153 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1153 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1154 | "Test #%u: Guest entered to local place: %d\n", | 1154 | "Test #%u: Guest entered local place: %d\n", |
1155 | test, result); | 1155 | test, result); |
1156 | GNUNET_assert (0 <= result); | 1156 | GNUNET_assert (0 <= result); |
1157 | } | 1157 | } |
@@ -1160,8 +1160,8 @@ guest_recv_local_enter (void *cls, int result, | |||
1160 | static void | 1160 | static void |
1161 | guest_enter () | 1161 | guest_enter () |
1162 | { | 1162 | { |
1163 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1163 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1164 | "Test #%u: Entering to place as guest.\n", test); | 1164 | "Test #%u: Entering place as guest.\n", test); |
1165 | 1165 | ||
1166 | struct GuestEnterMessage *emsg = &guest_enter_msg; | 1166 | struct GuestEnterMessage *emsg = &guest_enter_msg; |
1167 | 1167 | ||
@@ -1192,8 +1192,8 @@ static void | |||
1192 | guest_enter_by_name () | 1192 | guest_enter_by_name () |
1193 | { | 1193 | { |
1194 | test = TEST_GUEST_ENTER_BY_NAME; | 1194 | test = TEST_GUEST_ENTER_BY_NAME; |
1195 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1195 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1196 | "Test #%u: Entering to place by name as guest.\n", test); | 1196 | "Test #%u: Entering place by name as guest.\n", test); |
1197 | 1197 | ||
1198 | struct GuestEnterMessage *emsg = &guest_enter_msg; | 1198 | struct GuestEnterMessage *emsg = &guest_enter_msg; |
1199 | 1199 | ||
@@ -1285,8 +1285,8 @@ host_entered (void *cls, int result, | |||
1285 | { | 1285 | { |
1286 | place_pub_key = *home_pub_key; | 1286 | place_pub_key = *home_pub_key; |
1287 | GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash); | 1287 | GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash); |
1288 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1288 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1289 | "Test #%u: Host entered to place %s\n", | 1289 | "Test #%u: Host entered place %s\n", |
1290 | test, GNUNET_h2s (&place_pub_hash)); | 1290 | test, GNUNET_h2s (&place_pub_hash)); |
1291 | guest_enter (); | 1291 | guest_enter (); |
1292 | } | 1292 | } |
@@ -1300,8 +1300,8 @@ host_enter () | |||
1300 | host_recv_method, host_recv_modifier, | 1300 | host_recv_method, host_recv_modifier, |
1301 | host_recv_data, host_recv_eom, NULL); | 1301 | host_recv_data, host_recv_eom, NULL); |
1302 | 1302 | ||
1303 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1303 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1304 | "Test #%u: Entering to place as host.\n", test); | 1304 | "Test #%u: Entering place as host.\n", test); |
1305 | test = TEST_HOST_ENTER; | 1305 | test = TEST_HOST_ENTER; |
1306 | hst = GNUNET_SOCIAL_host_enter (app, host_ego, | 1306 | hst = GNUNET_SOCIAL_host_enter (app, host_ego, |
1307 | GNUNET_PSYC_CHANNEL_PRIVATE, | 1307 | GNUNET_PSYC_CHANNEL_PRIVATE, |
@@ -1321,7 +1321,7 @@ start_app_if_ready () | |||
1321 | { | 1321 | { |
1322 | return; | 1322 | return; |
1323 | } | 1323 | } |
1324 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1324 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1325 | "starting app...\n"); | 1325 | "starting app...\n"); |
1326 | app = GNUNET_SOCIAL_app_connect (cfg, | 1326 | app = GNUNET_SOCIAL_app_connect (cfg, |
1327 | app_id, | 1327 | app_id, |
@@ -1341,17 +1341,17 @@ identity_ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, | |||
1341 | { | 1341 | { |
1342 | if (ego == identity_host_ego) | 1342 | if (ego == identity_host_ego) |
1343 | { | 1343 | { |
1344 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1344 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1345 | "Host ego deleted\n"); | 1345 | "Host ego deleted\n"); |
1346 | } | 1346 | } |
1347 | else if (ego == identity_guest_ego) | 1347 | else if (ego == identity_guest_ego) |
1348 | { | 1348 | { |
1349 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1349 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1350 | "Guest ego deleted\n"); | 1350 | "Guest ego deleted\n"); |
1351 | } | 1351 | } |
1352 | else if (0 == strcmp (name, host_name)) | 1352 | else if (0 == strcmp (name, host_name)) |
1353 | { | 1353 | { |
1354 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1354 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1355 | "Created ego %s\n", | 1355 | "Created ego %s\n", |
1356 | name); | 1356 | name); |
1357 | identity_host_ego = ego; | 1357 | identity_host_ego = ego; |
@@ -1359,7 +1359,7 @@ identity_ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, | |||
1359 | } | 1359 | } |
1360 | else if (0 == strcmp (name, guest_name)) | 1360 | else if (0 == strcmp (name, guest_name)) |
1361 | { | 1361 | { |
1362 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1362 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1363 | "Created guest ego %s\n", | 1363 | "Created guest ego %s\n", |
1364 | name); | 1364 | name); |
1365 | identity_guest_ego = ego; | 1365 | identity_guest_ego = ego; |