aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/mesh_api.c
diff options
context:
space:
mode:
authorPhilipp Tölke <toelke@in.tum.de>2011-06-15 07:15:39 +0000
committerPhilipp Tölke <toelke@in.tum.de>2011-06-15 07:15:39 +0000
commit238b4ac9407e047a7a2d6f0c951e70ef6e400d82 (patch)
tree6ed40257e05d95ea3c8003e727101f035169bb11 /src/mesh/mesh_api.c
parent36ae035929059eccda334bdecdcc774d7e0f3496 (diff)
downloadgnunet-238b4ac9407e047a7a2d6f0c951e70ef6e400d82.tar.gz
gnunet-238b4ac9407e047a7a2d6f0c951e70ef6e400d82.zip
fix bugs found by compiling with -Wextra
Diffstat (limited to 'src/mesh/mesh_api.c')
-rw-r--r--src/mesh/mesh_api.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index edbc549b8..c1875854e 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -127,6 +127,9 @@ static void
127send_end_connect(void* cls, 127send_end_connect(void* cls,
128 const struct GNUNET_SCHEDULER_TaskContext* tc) 128 const struct GNUNET_SCHEDULER_TaskContext* tc)
129{ 129{
130 if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
131 return;
132
130 struct GNUNET_MESH_Tunnel* tunnel = cls; 133 struct GNUNET_MESH_Tunnel* tunnel = cls;
131 134
132 tunnel->connect_handler(tunnel->handler_cls, NULL, NULL); 135 tunnel->connect_handler(tunnel->handler_cls, NULL, NULL);
@@ -136,6 +139,9 @@ static void
136send_self_connect(void* cls, 139send_self_connect(void* cls,
137 const struct GNUNET_SCHEDULER_TaskContext* tc) 140 const struct GNUNET_SCHEDULER_TaskContext* tc)
138{ 141{
142 if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
143 return;
144
139 struct GNUNET_MESH_Tunnel* tunnel = cls; 145 struct GNUNET_MESH_Tunnel* tunnel = cls;
140 146
141 tunnel->connect_handler(tunnel->handler_cls, &tunnel->handle->myself, NULL); 147 tunnel->connect_handler(tunnel->handler_cls, &tunnel->handle->myself, NULL);
@@ -146,6 +152,9 @@ static void
146call_connect_handler (void *cls, 152call_connect_handler (void *cls,
147 const struct GNUNET_SCHEDULER_TaskContext *tc) 153 const struct GNUNET_SCHEDULER_TaskContext *tc)
148{ 154{
155 if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
156 return;
157
149 struct GNUNET_MESH_Tunnel *tunnel = cls; 158 struct GNUNET_MESH_Tunnel *tunnel = cls;
150 159
151 tunnel->connect_handler (tunnel->handler_cls, &tunnel->peer, 160 tunnel->connect_handler (tunnel->handler_cls, &tunnel->peer,
@@ -689,7 +698,7 @@ GNUNET_MESH_connect (const struct
689 698
690 build_hello_message(ret, stypes); 699 build_hello_message(ret, stypes);
691 700
692 const static struct GNUNET_CORE_MessageHandler core_handlers[] = { 701 static const struct GNUNET_CORE_MessageHandler core_handlers[] = {
693 {&core_receive, GNUNET_MESSAGE_TYPE_MESH, 0}, 702 {&core_receive, GNUNET_MESSAGE_TYPE_MESH, 0},
694 {&receive_hello, GNUNET_MESSAGE_TYPE_MESH_HELLO, 0}, 703 {&receive_hello, GNUNET_MESSAGE_TYPE_MESH_HELLO, 0},
695 {NULL, 0, 0} 704 {NULL, 0, 0}