aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api_cmd_stop_peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport_api_cmd_stop_peer.c')
-rw-r--r--src/transport/transport_api_cmd_stop_peer.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/transport/transport_api_cmd_stop_peer.c b/src/transport/transport_api_cmd_stop_peer.c
index 97408b083..4ca730add 100644
--- a/src/transport/transport_api_cmd_stop_peer.c
+++ b/src/transport/transport_api_cmd_stop_peer.c
@@ -58,7 +58,7 @@ stop_peer_run (void *cls,
58 struct GNUNET_TESTING_Interpreter *is) 58 struct GNUNET_TESTING_Interpreter *is)
59{ 59{
60 struct StopPeerState *stop_ps = cls; 60 struct StopPeerState *stop_ps = cls;
61 struct StartPeerState *sps; 61 const struct StartPeerState *sps;
62 const struct GNUNET_TESTING_Command *start_cmd; 62 const struct GNUNET_TESTING_Command *start_cmd;
63 63
64 start_cmd = GNUNET_TESTING_interpreter_lookup_command (is, 64 start_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
@@ -69,24 +69,20 @@ stop_peer_run (void *cls,
69 if (NULL != sps->pic) 69 if (NULL != sps->pic)
70 { 70 {
71 GNUNET_PEERSTORE_iterate_cancel (sps->pic); 71 GNUNET_PEERSTORE_iterate_cancel (sps->pic);
72 sps->pic = NULL;
73 } 72 }
74 if (NULL != sps->th) 73 if (NULL != sps->th)
75 { 74 {
76 GNUNET_TRANSPORT_core_disconnect (sps->th); 75 GNUNET_TRANSPORT_core_disconnect (sps->th);
77 sps->th = NULL;
78 } 76 }
79 if (NULL != sps->ah) 77 if (NULL != sps->ah)
80 { 78 {
81 GNUNET_TRANSPORT_application_done (sps->ah); 79 GNUNET_TRANSPORT_application_done (sps->ah);
82 sps->ah = NULL;
83 } 80 }
84 if (NULL != sps->ph) 81 if (NULL != sps->ph)
85 { 82 {
86 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 83 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
87 "Disconnecting from PEERSTORE service\n"); 84 "Disconnecting from PEERSTORE service\n");
88 GNUNET_PEERSTORE_disconnect (sps->ph, GNUNET_NO); 85 GNUNET_PEERSTORE_disconnect (sps->ph, GNUNET_NO);
89 sps->ph = NULL;
90 } 86 }
91 if (NULL != sps->peer) 87 if (NULL != sps->peer)
92 { 88 {
@@ -99,12 +95,9 @@ stop_peer_run (void *cls,
99 GNUNET_i2s (&sps->id)); 95 GNUNET_i2s (&sps->id));
100 } 96 }
101 GNUNET_TESTING_peer_destroy (sps->peer); 97 GNUNET_TESTING_peer_destroy (sps->peer);
102 sps->peer = NULL;
103 } 98 }
104 if (NULL != sps->rh_task) 99 if (NULL != sps->rh_task)
105 GNUNET_SCHEDULER_cancel (sps->rh_task); 100 GNUNET_SCHEDULER_cancel (sps->rh_task);
106 sps->rh_task = NULL;
107
108} 101}
109 102
110 103