gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r16699 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r16699 - gnunet/src/transport
Date: Mon, 5 Sep 2011 14:24:07 +0200

Author: wachs
Date: 2011-09-05 14:24:07 +0200 (Mon, 05 Sep 2011)
New Revision: 16699

Modified:
   gnunet/src/transport/gnunet-service-transport_neighbours.c
Log:
ensure neighbour map is existing


Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c  2011-09-05 
11:25:09 UTC (rev 16698)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c  2011-09-05 
12:24:07 UTC (rev 16699)
@@ -226,7 +226,6 @@
  */
 static GNUNET_TRANSPORT_NotifyDisconnect disconnect_notify_cb;
 
-
 /**
  * Lookup a neighbour entry in the neighbours hash map.
  *
@@ -477,6 +476,8 @@
 void
 GST_neighbours_stop ()
 {
+  GNUNET_assert (neighbours != NULL);
+
   GNUNET_CONTAINER_multihashmap_iterate (neighbours, 
&disconnect_all_neighbours,
                                          NULL);
   GNUNET_CONTAINER_multihashmap_destroy (neighbours);
@@ -510,6 +511,8 @@
   struct NeighbourMapEntry *n;
   struct GNUNET_MessageHeader connect_msg;
 
+  GNUNET_assert (neighbours != NULL);
+
   n = lookup_neighbour (peer);
   if (NULL == n)
   {
@@ -593,6 +596,8 @@
 {
   struct NeighbourMapEntry *n;
 
+  GNUNET_assert (neighbours != NULL);
+
   GNUNET_assert (0 !=
                  memcmp (target, &GST_my_identity,
                          sizeof (struct GNUNET_PeerIdentity)));
@@ -633,6 +638,8 @@
 {
   struct NeighbourMapEntry *n;
 
+  GNUNET_assert (neighbours != NULL);
+
   n = lookup_neighbour (target);
   if ((NULL == n) || (n->is_connected != GNUNET_YES))
     return GNUNET_NO;           /* not connected */
@@ -652,6 +659,8 @@
 {
   struct NeighbourMapEntry *n;
 
+  GNUNET_assert (neighbours != NULL);
+
   n = lookup_neighbour (peer);
   if (NULL == n)
     return;
@@ -695,6 +704,8 @@
   struct NeighbourMapEntry *n;
   struct MessageQueue *mq;
 
+  GNUNET_assert (neighbours != NULL);
+
   n = lookup_neighbour (target);
   if ((n == NULL) || (GNUNET_YES != n->is_connected))
   {
@@ -754,6 +765,8 @@
   struct NeighbourMapEntry *n;
   struct GNUNET_TIME_Relative ret;
 
+  GNUNET_assert (neighbours != NULL);
+
   n = lookup_neighbour (sender);
   if (n == NULL)
   {
@@ -821,6 +834,8 @@
 {
   struct NeighbourMapEntry *n;
 
+  GNUNET_assert (neighbours != NULL);
+
   n = lookup_neighbour (neighbour);
   if (NULL == n)
   {
@@ -849,6 +864,8 @@
 {
   struct NeighbourMapEntry *n;
 
+  GNUNET_assert (neighbours != NULL);
+
   n = lookup_neighbour (neighbour);
   if (n == NULL)
   {
@@ -922,6 +939,8 @@
 {
   struct IteratorContext ic;
 
+  GNUNET_assert (neighbours != NULL);
+
   ic.cb = cb;
   ic.cb_cls = cb_cls;
   GNUNET_CONTAINER_multihashmap_iterate (neighbours, &neighbours_iterate, &ic);
@@ -940,6 +959,8 @@
   struct GNUNET_TRANSPORT_PluginFunctions *papi;
   struct GNUNET_MessageHeader disconnect_msg;
 
+  GNUNET_assert (neighbours != NULL);
+
   n = lookup_neighbour (target);
   if (NULL == n)
     return;                     /* not active */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]