diff options
Diffstat (limited to 'src/transport/transport_api_cmd_start_peer.c')
-rw-r--r-- | src/transport/transport_api_cmd_start_peer.c | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/src/transport/transport_api_cmd_start_peer.c b/src/transport/transport_api_cmd_start_peer.c index 8a53ed22c..44fc68807 100644 --- a/src/transport/transport_api_cmd_start_peer.c +++ b/src/transport/transport_api_cmd_start_peer.c | |||
@@ -51,6 +51,7 @@ hello_iter_cb (void *cb_cls, | |||
51 | const char *emsg) | 51 | const char *emsg) |
52 | { | 52 | { |
53 | struct StartPeerState *sps = cb_cls; | 53 | struct StartPeerState *sps = cb_cls; |
54 | |||
54 | if (NULL == record) | 55 | if (NULL == record) |
55 | { | 56 | { |
56 | sps->pic = NULL; | 57 | sps->pic = NULL; |
@@ -90,26 +91,6 @@ retrieve_hello (void *cls) | |||
90 | 91 | ||
91 | 92 | ||
92 | /** | 93 | /** |
93 | * This function checks StartPeerState#finished, which is set when the hello was retrieved. | ||
94 | * | ||
95 | */ | ||
96 | static int | ||
97 | start_peer_finish (void *cls, | ||
98 | GNUNET_SCHEDULER_TaskCallback cont, | ||
99 | void *cont_cls) | ||
100 | { | ||
101 | struct StartPeerState *sps = cls; | ||
102 | |||
103 | if (GNUNET_YES == sps->finished) | ||
104 | { | ||
105 | cont (cont_cls); | ||
106 | } | ||
107 | |||
108 | return sps->finished; | ||
109 | } | ||
110 | |||
111 | |||
112 | /** | ||
113 | * Disconnect callback for the connection to the core service. | 94 | * Disconnect callback for the connection to the core service. |
114 | * | 95 | * |
115 | */ | 96 | */ |
@@ -597,14 +578,15 @@ GNUNET_TRANSPORT_cmd_start_peer (const char *label, | |||
597 | i * sizeof(struct GNUNET_MQ_MessageHandler)); | 578 | i * sizeof(struct GNUNET_MQ_MessageHandler)); |
598 | } | 579 | } |
599 | 580 | ||
600 | struct GNUNET_TESTING_Command cmd = { | 581 | { |
601 | .cls = sps, | 582 | struct GNUNET_TESTING_Command cmd = { |
602 | .label = label, | 583 | .cls = sps, |
603 | .run = &start_peer_run, | 584 | .label = label, |
604 | .finish = &start_peer_finish, | 585 | .run = &start_peer_run, |
605 | .cleanup = &start_peer_cleanup, | 586 | .cleanup = &start_peer_cleanup, |
606 | .traits = &start_peer_traits | 587 | .traits = &start_peer_traits |
607 | }; | 588 | }; |
608 | 589 | ||
609 | return cmd; | 590 | return cmd; |
591 | } | ||
610 | } | 592 | } |