aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-10-14 11:29:21 +0000
committerBart Polot <bart@net.in.tum.de>2011-10-14 11:29:21 +0000
commit5abcb3f3648cc184e0b7c9960d6c35fc2703b418 (patch)
treebac0fafd44db80542016c7b8e2496ca7660f3bbf /src/mesh
parent7e28666043970cb1489cca22d21397e45af946ac (diff)
downloadgnunet-5abcb3f3648cc184e0b7c9960d6c35fc2703b418.tar.gz
gnunet-5abcb3f3648cc184e0b7c9960d6c35fc2703b418.zip
Additional extra check for coverity 10211
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/gnunet-service-mesh.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 1c636443b..773710611 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -698,6 +698,7 @@ send_subscribed_clients (const struct GNUNET_MessageHeader *msg,
698{ 698{
699 struct GNUNET_PeerIdentity *oid; 699 struct GNUNET_PeerIdentity *oid;
700 struct MeshClient *c; 700 struct MeshClient *c;
701 struct MeshTunnel *t;
701 MESH_TunnelNumber *tid; 702 MESH_TunnelNumber *tid;
702 unsigned int count; 703 unsigned int count;
703 uint16_t type; 704 uint16_t type;
@@ -733,7 +734,13 @@ send_subscribed_clients (const struct GNUNET_MessageHeader *msg,
733 GNUNET_break (0); 734 GNUNET_break (0);
734 return 0; 735 return 0;
735 } 736 }
736 *tid = htonl (tunnel_get (oid, ntohl(*tid))->local_tid); 737 t = tunnel_get (oid, ntohl(*tid));
738 if (NULL == t)
739 {
740 GNUNET_break (0);
741 return 0;
742 }
743 *tid = htonl (t->local_tid);
737 for (count = 0, c = clients; c != NULL; c = c->next) 744 for (count = 0, c = clients; c != NULL; c = c->next)
738 { 745 {
739 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: client %u\n", c->id); 746 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: client %u\n", c->id);