diff options
Diffstat (limited to 'src/transport/transport-testing2.c')
-rw-r--r-- | src/transport/transport-testing2.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c index fe2f28f54..fc6d13590 100644 --- a/src/transport/transport-testing2.c +++ b/src/transport/transport-testing2.c | |||
@@ -84,6 +84,8 @@ struct GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle | |||
84 | */ | 84 | */ |
85 | char *cfg_filename; | 85 | char *cfg_filename; |
86 | 86 | ||
87 | struct GNUNET_PeerIdentity peer_id; | ||
88 | |||
87 | /** | 89 | /** |
88 | * @brief Handle to the transport service | 90 | * @brief Handle to the transport service |
89 | */ | 91 | */ |
@@ -368,7 +370,8 @@ handle_communicator_backchannel (void *cls, | |||
368 | struct GNUNET_TRANSPORT_CommunicatorBackchannelIncoming *cbi; | 370 | struct GNUNET_TRANSPORT_CommunicatorBackchannelIncoming *cbi; |
369 | struct GNUNET_MQ_Envelope *env; | 371 | struct GNUNET_MQ_Envelope *env; |
370 | 372 | ||
371 | 373 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | |
374 | "Received backchannel message\n"); | ||
372 | if (tc_h->bc_enabled != GNUNET_YES) | 375 | if (tc_h->bc_enabled != GNUNET_YES) |
373 | { | 376 | { |
374 | GNUNET_SERVICE_client_continue (client->client); | 377 | GNUNET_SERVICE_client_continue (client->client); |
@@ -386,7 +389,7 @@ handle_communicator_backchannel (void *cls, | |||
386 | cbi, | 389 | cbi, |
387 | isize, | 390 | isize, |
388 | GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL_INCOMING); | 391 | GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL_INCOMING); |
389 | cbi->pid = bc_msg->pid; | 392 | cbi->pid = tc_h->peer_id; |
390 | memcpy (&cbi[1], msg, isize); | 393 | memcpy (&cbi[1], msg, isize); |
391 | 394 | ||
392 | 395 | ||
@@ -934,6 +937,7 @@ GNUNET_TRANSPORT_TESTING_transport_communicator_service_start ( | |||
934 | const char *service_name, | 937 | const char *service_name, |
935 | const char *binary_name, | 938 | const char *binary_name, |
936 | const char *cfg_filename, | 939 | const char *cfg_filename, |
940 | const struct GNUNET_PeerIdentity *peer_id, | ||
937 | GNUNET_TRANSPORT_TESTING_CommunicatorAvailableCallback | 941 | GNUNET_TRANSPORT_TESTING_CommunicatorAvailableCallback |
938 | communicator_available_cb, | 942 | communicator_available_cb, |
939 | GNUNET_TRANSPORT_TESTING_AddAddressCallback add_address_cb, | 943 | GNUNET_TRANSPORT_TESTING_AddAddressCallback add_address_cb, |
@@ -971,6 +975,7 @@ GNUNET_TRANSPORT_TESTING_transport_communicator_service_start ( | |||
971 | tc_h->add_queue_cb = add_queue_cb; | 975 | tc_h->add_queue_cb = add_queue_cb; |
972 | tc_h->incoming_msg_cb = incoming_message_cb; | 976 | tc_h->incoming_msg_cb = incoming_message_cb; |
973 | tc_h->bc_cb = bc_cb; | 977 | tc_h->bc_cb = bc_cb; |
978 | tc_h->peer_id = *peer_id; | ||
974 | tc_h->cb_cls = cb_cls; | 979 | tc_h->cb_cls = cb_cls; |
975 | 980 | ||
976 | /* Start communicator part of service */ | 981 | /* Start communicator part of service */ |
@@ -1069,6 +1074,8 @@ GNUNET_TRANSPORT_TESTING_transport_communicator_send | |||
1069 | struct GNUNET_MQ_Envelope *env; | 1074 | struct GNUNET_MQ_Envelope *env; |
1070 | size_t inbox_size; | 1075 | size_t inbox_size; |
1071 | 1076 | ||
1077 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1078 | "Sending message\n"); | ||
1072 | inbox_size = sizeof (struct GNUNET_MessageHeader) + payload_size; | 1079 | inbox_size = sizeof (struct GNUNET_MessageHeader) + payload_size; |
1073 | env = GNUNET_MQ_msg_extra (msg, | 1080 | env = GNUNET_MQ_msg_extra (msg, |
1074 | inbox_size, | 1081 | inbox_size, |