aboutsummaryrefslogtreecommitdiff
path: root/src/social/test_social.c
diff options
context:
space:
mode:
authorpsyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet>2017-10-13 18:56:10 +0000
committerpsyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet>2017-10-13 18:56:10 +0000
commitb829c58174f5ac332810436d7b43ff90a92b8426 (patch)
treee9a3e97df73a20a86ac1b8f860cc7b4104324d35 /src/social/test_social.c
parent7478bbf75478b0df49ba06379888aae3632c2bf5 (diff)
-we no enter to place
Diffstat (limited to 'src/social/test_social.c')
-rw-r--r--src/social/test_social.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/social/test_social.c b/src/social/test_social.c
index 505780a694..8d49e7413b 100644
--- a/src/social/test_social.c
+++ b/src/social/test_social.c
@@ -244,7 +244,7 @@ end_normally (void *cls)
{
res = 0;
cleanup ();
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test PASSED.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test PASSED.\n");
}
@@ -254,7 +254,7 @@ end_normally (void *cls)
static void
end ()
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Ending tests.\n", test);
if (end_badly_task != NULL)
@@ -271,7 +271,7 @@ transmit_resume (void *cls)
{
struct TransmitClosure *tmit = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Transmission resumed.\n", test);
if (NULL != tmit->host_ann)
GNUNET_SOCIAL_host_announce_resume (tmit->host_ann);
@@ -296,7 +296,7 @@ notify_data (void *cls, uint16_t *data_size, void *data)
}
uint16_t size = strlen (tmit->data[tmit->n]);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Transmit notify data: %u bytes available, "
"processing fragment %u/%u (size %u).\n",
test, *data_size, tmit->n + 1, tmit->data_count, size);
@@ -309,7 +309,7 @@ notify_data (void *cls, uint16_t *data_size, void *data)
if (GNUNET_YES != tmit->paused && 0 < tmit->data_delay[tmit->n])
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Transmission paused.\n", test);
tmit->paused = GNUNET_YES;
GNUNET_SCHEDULER_add_delayed (
@@ -331,7 +331,7 @@ notify_data (void *cls, uint16_t *data_size, void *data)
static void
host_left ()
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: The host has left the place.\n", test);
end ();
}
@@ -365,7 +365,7 @@ host_reconnected (void *cls, int result,
{
place_pub_key = *home_pub_key;
GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Host reconnected to place %s\n",
test, GNUNET_h2s (&place_pub_hash));
@@ -382,7 +382,7 @@ guest_reconnected (void *cls, int result,
const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
uint64_t max_message_id)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Guest reconnected to place: %d\n",
test, result);
GNUNET_assert (0 <= result);
@@ -398,7 +398,7 @@ guest_reconnected (void *cls, int result,
static void
app_connected (void *cls)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: App connected: %p\n", test, cls);
}
@@ -413,7 +413,7 @@ app_recv_host (void *cls,
struct GNUNET_HashCode host_pub_hash;
GNUNET_CRYPTO_hash (host_pub_key, sizeof (*host_pub_key), &host_pub_hash);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Got app host place notification: %s\n",
test, GNUNET_h2s (&host_pub_hash));
@@ -421,7 +421,7 @@ app_recv_host (void *cls,
{
if (0 == memcmp (&place_pub_key, host_pub_key, sizeof (*host_pub_key)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Reconnecting to host place: %s\n",
test, GNUNET_h2s (&host_pub_hash));
hst = GNUNET_SOCIAL_host_enter_reconnect (hconn, host_slicer, host_reconnected,
@@ -441,7 +441,7 @@ app_recv_guest (void *cls,
struct GNUNET_HashCode guest_pub_hash;
GNUNET_CRYPTO_hash (guest_pub_key, sizeof (*guest_pub_key), &guest_pub_hash);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Got app guest place notification: %s\n",
test, GNUNET_h2s (&guest_pub_hash));
@@ -449,7 +449,7 @@ app_recv_guest (void *cls,
{
if (0 == memcmp (&place_pub_key, guest_pub_key, sizeof (*guest_pub_key)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Reconnecting to guest place: %s\n",
test, GNUNET_h2s (&guest_pub_hash));
gst = GNUNET_SOCIAL_guest_enter_reconnect (gconn, GNUNET_PSYC_SLAVE_JOIN_NONE,
@@ -478,7 +478,7 @@ app_recv_ego (void *cls,
const char *name)
{
char *ego_pub_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Got app ego notification: %p %s %s\n",
test, ego, name, ego_pub_str);
GNUNET_free (ego_pub_str);
@@ -506,7 +506,7 @@ app_recv_ego (void *cls,
}
else
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"test = %d\n",
test);
GNUNET_assert (TEST_RECONNECT == test);
@@ -539,7 +539,7 @@ static void
host_recv_zone_add_place_result (void *cls, int64_t result,
const void *data, uint16_t data_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Zone add place result: %" PRId64 " (%.*s).\n",
test, result, data_size, (const char *) data);
GNUNET_assert (GNUNET_YES == result);
@@ -553,7 +553,7 @@ static void
zone_add_place ()
{
test = TEST_ZONE_ADD_PLACE;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Adding place to zone.\n", test);
GNUNET_SOCIAL_zone_add_place (app, host_ego, "home", "let.me*in!",
@@ -572,7 +572,7 @@ host_farewell (void *cls,
nym_key = GNUNET_SOCIAL_nym_get_pub_key (nym);
char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Farewell: nym %s (%s) has left the place.\n",
test, GNUNET_h2s (GNUNET_SOCIAL_nym_get_pub_key_hash (nym)), str);
GNUNET_free (str);
@@ -593,7 +593,7 @@ host_farewell (void *cls,
static void
guest_left (void *cls)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: The guest has left the place.\n", test);
}
@@ -630,7 +630,7 @@ guest_look_for_result (void *cls,
uint16_t data_size)
{
struct ResultClosure *rcls = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: guest_look_for_result: %" PRId64 "\n",
test, result_code);
GNUNET_assert (GNUNET_OK == result_code);
@@ -650,7 +650,7 @@ guest_look_for_var (void *cls,
{
struct ResultClosure *rcls = cls;
rcls->n++;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: guest_look_for_var: %s\n%.*s\n",
test, name, value_size, (const char *) value);
}
@@ -671,7 +671,7 @@ guest_look_at_result (void *cls, int64_t result_code,
{
struct ResultClosure *rcls = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: guest_look_at_result: %" PRId64 "\n",
test, result_code);
GNUNET_assert (GNUNET_OK == result_code);
@@ -692,7 +692,7 @@ guest_look_at_var (void *cls,
struct ResultClosure *rcls = cls;
rcls->n++;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: guest_look_at_var: %s\n%.*s\n",
test ,name, value_size, (const char *) value);
}
@@ -711,7 +711,7 @@ static void
guest_recv_history_replay_latest_result (void *cls, int64_t result,
const void *data, uint16_t data_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Guest received latest history replay result "
"(%" PRIu32 " messages, %" PRId64 " fragments):\n"
"%.*s\n",
@@ -740,7 +740,7 @@ static void
guest_recv_history_replay_result (void *cls, int64_t result,
const void *data, uint16_t data_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Guest received history replay result: %" PRId64 "\n"
"%.*s\n",
test, result, data_size, (const char *) data);
@@ -771,7 +771,7 @@ guest_recv_method (void *cls,
uint64_t message_id,
const char *method_name)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Guest received method for message ID %" PRIu64 ":\n"
"%s (flags: %x)\n",
test, message_id, method_name, ntohl (meth->flags));
@@ -790,7 +790,7 @@ guest_recv_modifier (void *cls,
uint16_t value_size,
uint16_t full_value_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Guest received modifier for message ID %" PRIu64 ":\n"
"%c%s: %.*s (size: %u)\n",
test, message_id, oper, name, value_size, (const char *) value, value_size);
@@ -808,7 +808,7 @@ guest_recv_mod_foo_bar (void *cls,
uint16_t value_size,
uint16_t full_value_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Guest received modifier matching _foo_bar for message ID %" PRIu64 ":\n"
"%c%s: %.*s (size: %u)\n",
test, message_id, oper, name, value_size, (const char *) value, value_size);
@@ -826,7 +826,7 @@ guest_recv_data (void *cls,
const void *data,
uint16_t data_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Guest received data for message ID %" PRIu64 ":\n"
"%.*s\n",
test, message_id, data_size, (const char *) data);
@@ -841,7 +841,7 @@ guest_recv_eom (void *cls,
uint64_t message_id,
uint8_t is_cancelled)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Guest received end of message ID %" PRIu64
", cancelled: %u\n",
test, message_id, is_cancelled);
@@ -883,7 +883,7 @@ host_recv_method (void *cls,
uint64_t message_id,
const char *method_name)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Host received method for message ID %" PRIu64 ":\n"
"%s\n",
test, message_id, method_name);
@@ -902,7 +902,7 @@ host_recv_modifier (void *cls,
uint16_t value_size,
uint16_t full_value_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Host received modifier for message ID %" PRIu64 ":\n"
"%c%s: %.*s\n",
test, message_id, oper, name, value_size, (const char *) value);
@@ -917,7 +917,7 @@ host_recv_data (void *cls,
const void *data,
uint16_t data_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Host received data for message ID %" PRIu64 ":\n"
"%.*s\n",
test, message_id, data_size, (const char *) data);
@@ -931,7 +931,7 @@ host_recv_eom (void *cls,
uint64_t message_id,
uint8_t is_cancelled)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Host received end of message ID %" PRIu64
", cancelled: %u\n",
test, message_id, is_cancelled);
@@ -996,7 +996,7 @@ host_announce ()
{
test = TEST_HOST_ANNOUNCE;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Host announcement.\n", test);
tmit = (struct TransmitClosure) {};
@@ -1030,7 +1030,7 @@ host_announce2 ()
test = TEST_HOST_ANNOUNCE2;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Host announcement 2.\n", test);
tmit = (struct TransmitClosure) {};
@@ -1058,7 +1058,7 @@ guest_recv_entry_decision (void *cls,
int is_admitted,
const struct GNUNET_PSYC_Message *entry_msg)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Guest received entry decision (try %u): %d.\n",
test, join_req_count, is_admitted);
@@ -1112,7 +1112,7 @@ host_answer_door (void *cls,
{
join_req_count++;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Test #%u: Host received entry request from guest (try %u).\n",
(uint8_t) test, join_req_count);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1150,8 +1150,8 @@ guest_recv_local_enter (void *cls, int result,
const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
uint64_t max_message_id)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Test #%u: Guest entered to local place: %d\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+ "Test #%u: Guest entered local place: %d\n",
test, result);
GNUNET_assert (0 <= result);
}
@@ -1160,8 +1160,8 @@ guest_recv_local_enter (void *cls, int result,
static void
guest_enter ()
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Test #%u: Entering to place as guest.\n", test);
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+ "Test #%u: Entering place as guest.\n", test);
struct GuestEnterMessage *emsg = &guest_enter_msg;
@@ -1192,8 +1192,8 @@ static void
guest_enter_by_name ()
{
test = TEST_GUEST_ENTER_BY_NAME;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Test #%u: Entering to place by name as guest.\n", test);
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+ "Test #%u: Entering place by name as guest.\n", test);
struct GuestEnterMessage *emsg = &guest_enter_msg;
@@ -1285,8 +1285,8 @@ host_entered (void *cls, int result,
{
place_pub_key = *home_pub_key;
GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Test #%u: Host entered to place %s\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+ "Test #%u: Host entered place %s\n",
test, GNUNET_h2s (&place_pub_hash));
guest_enter ();
}
@@ -1300,8 +1300,8 @@ host_enter ()
host_recv_method, host_recv_modifier,
host_recv_data, host_recv_eom, NULL);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Test #%u: Entering to place as host.\n", test);
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+ "Test #%u: Entering place as host.\n", test);
test = TEST_HOST_ENTER;
hst = GNUNET_SOCIAL_host_enter (app, host_ego,
GNUNET_PSYC_CHANNEL_PRIVATE,
@@ -1321,7 +1321,7 @@ start_app_if_ready ()
{
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"starting app...\n");
app = GNUNET_SOCIAL_app_connect (cfg,
app_id,
@@ -1341,17 +1341,17 @@ identity_ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego,
{
if (ego == identity_host_ego)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Host ego deleted\n");
}
else if (ego == identity_guest_ego)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Guest ego deleted\n");
}
else if (0 == strcmp (name, host_name))
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Created ego %s\n",
name);
identity_host_ego = ego;
@@ -1359,7 +1359,7 @@ identity_ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego,
}
else if (0 == strcmp (name, guest_name))
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"Created guest ego %s\n",
name);
identity_guest_ego = ego;