diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-12-22 22:52:08 +0900 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-12-22 22:52:08 +0900 |
commit | 5402016fcb271bbfa9c9470bd281d73b72e75bca (patch) | |
tree | 7b6ea446c5e537b0484070ae022ddde2aad3e5dd /src/transport/transport-testing2.c | |
parent | 61a8f2c46ddd10d86e568dd8fe2f533ae31a6c81 (diff) | |
download | gnunet-5402016fcb271bbfa9c9470bd281d73b72e75bca.tar.gz gnunet-5402016fcb271bbfa9c9470bd281d73b72e75bca.zip |
basic tests
Diffstat (limited to 'src/transport/transport-testing2.c')
-rw-r--r-- | src/transport/transport-testing2.c | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c index 230c35b4f..547f8611b 100644 --- a/src/transport/transport-testing2.c +++ b/src/transport/transport-testing2.c | |||
@@ -280,8 +280,6 @@ static int | |||
280 | check_add_address (void *cls, | 280 | check_add_address (void *cls, |
281 | const struct GNUNET_TRANSPORT_AddAddressMessage *msg) | 281 | const struct GNUNET_TRANSPORT_AddAddressMessage *msg) |
282 | { | 282 | { |
283 | struct TransportClient *tc = cls; | ||
284 | |||
285 | // if (CT_COMMUNICATOR != tc->type) | 283 | // if (CT_COMMUNICATOR != tc->type) |
286 | // { | 284 | // { |
287 | // GNUNET_break (0); | 285 | // GNUNET_break (0); |
@@ -568,6 +566,22 @@ disconnect_cb (void *cls, | |||
568 | tc_h->client = NULL; | 566 | tc_h->client = NULL; |
569 | } | 567 | } |
570 | 568 | ||
569 | /** | ||
570 | * Message was transmitted. Process the request. | ||
571 | * | ||
572 | * @param cls the client | ||
573 | * @param sma the send message that was sent | ||
574 | */ | ||
575 | static void | ||
576 | handle_send_message_ack (void *cls, | ||
577 | const struct GNUNET_TRANSPORT_SendMessageToAck *sma) | ||
578 | { | ||
579 | struct GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle *tc_h = cls; | ||
580 | GNUNET_SERVICE_client_continue (tc_h->client); | ||
581 | //NOP | ||
582 | } | ||
583 | |||
584 | |||
571 | 585 | ||
572 | /** | 586 | /** |
573 | * @brief Start the communicator part of the transport service | 587 | * @brief Start the communicator part of the transport service |
@@ -584,7 +598,7 @@ transport_communicator_start ( | |||
584 | GNUNET_MQ_hd_var_size (communicator_available, | 598 | GNUNET_MQ_hd_var_size (communicator_available, |
585 | GNUNET_MESSAGE_TYPE_TRANSPORT_NEW_COMMUNICATOR, | 599 | GNUNET_MESSAGE_TYPE_TRANSPORT_NEW_COMMUNICATOR, |
586 | struct GNUNET_TRANSPORT_CommunicatorAvailableMessage, | 600 | struct GNUNET_TRANSPORT_CommunicatorAvailableMessage, |
587 | &tc_h), | 601 | tc_h), |
588 | // GNUNET_MQ_hd_var_size (communicator_backchannel, | 602 | // GNUNET_MQ_hd_var_size (communicator_backchannel, |
589 | // GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL, | 603 | // GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL, |
590 | // struct GNUNET_TRANSPORT_CommunicatorBackchannel, | 604 | // struct GNUNET_TRANSPORT_CommunicatorBackchannel, |
@@ -592,7 +606,7 @@ transport_communicator_start ( | |||
592 | GNUNET_MQ_hd_var_size (add_address, | 606 | GNUNET_MQ_hd_var_size (add_address, |
593 | GNUNET_MESSAGE_TYPE_TRANSPORT_ADD_ADDRESS, | 607 | GNUNET_MESSAGE_TYPE_TRANSPORT_ADD_ADDRESS, |
594 | struct GNUNET_TRANSPORT_AddAddressMessage, | 608 | struct GNUNET_TRANSPORT_AddAddressMessage, |
595 | &tc_h), | 609 | tc_h), |
596 | // GNUNET_MQ_hd_fixed_size (del_address, | 610 | // GNUNET_MQ_hd_fixed_size (del_address, |
597 | // GNUNET_MESSAGE_TYPE_TRANSPORT_DEL_ADDRESS, | 611 | // GNUNET_MESSAGE_TYPE_TRANSPORT_DEL_ADDRESS, |
598 | // struct GNUNET_TRANSPORT_DelAddressMessage, | 612 | // struct GNUNET_TRANSPORT_DelAddressMessage, |
@@ -600,7 +614,7 @@ transport_communicator_start ( | |||
600 | GNUNET_MQ_hd_var_size (incoming_msg, | 614 | GNUNET_MQ_hd_var_size (incoming_msg, |
601 | GNUNET_MESSAGE_TYPE_TRANSPORT_INCOMING_MSG, | 615 | GNUNET_MESSAGE_TYPE_TRANSPORT_INCOMING_MSG, |
602 | struct GNUNET_TRANSPORT_IncomingMessage, | 616 | struct GNUNET_TRANSPORT_IncomingMessage, |
603 | NULL), | 617 | tc_h), |
604 | GNUNET_MQ_hd_fixed_size (queue_create_ok, | 618 | GNUNET_MQ_hd_fixed_size (queue_create_ok, |
605 | GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE_OK, | 619 | GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE_OK, |
606 | struct GNUNET_TRANSPORT_CreateQueueResponse, | 620 | struct GNUNET_TRANSPORT_CreateQueueResponse, |
@@ -612,15 +626,16 @@ transport_communicator_start ( | |||
612 | GNUNET_MQ_hd_var_size (add_queue_message, | 626 | GNUNET_MQ_hd_var_size (add_queue_message, |
613 | GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_SETUP, | 627 | GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_SETUP, |
614 | struct GNUNET_TRANSPORT_AddQueueMessage, | 628 | struct GNUNET_TRANSPORT_AddQueueMessage, |
615 | NULL), | 629 | tc_h), |
616 | // GNUNET_MQ_hd_fixed_size (del_queue_message, | 630 | // GNUNET_MQ_hd_fixed_size (del_queue_message, |
617 | // GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_TEARDOWN, | 631 | // GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_TEARDOWN, |
618 | // struct GNUNET_TRANSPORT_DelQueueMessage, | 632 | // struct GNUNET_TRANSPORT_DelQueueMessage, |
619 | // NULL), | 633 | // NULL), |
620 | // GNUNET_MQ_hd_fixed_size (send_message_ack, | 634 | GNUNET_MQ_hd_fixed_size (send_message_ack, |
621 | // GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_MSG_ACK, | 635 | GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_MSG_ACK, |
622 | // struct GNUNET_TRANSPORT_SendMessageToAck, | 636 | struct GNUNET_TRANSPORT_SendMessageToAck, |
623 | // NULL), | 637 | tc_h), |
638 | GNUNET_MQ_handler_end () | ||
624 | }; | 639 | }; |
625 | struct GNUNET_SERVICE_Handle *h; | 640 | struct GNUNET_SERVICE_Handle *h; |
626 | 641 | ||