gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r4998 - GNUnet/src/transports


From: gnunet
Subject: [GNUnet-SVN] r4998 - GNUnet/src/transports
Date: Sat, 9 Jun 2007 21:07:31 -0600 (MDT)

Author: grothoff
Date: 2007-06-09 21:07:30 -0600 (Sat, 09 Jun 2007)
New Revision: 4998

Modified:
   GNUnet/src/transports/ip.c
Log:
doh

Modified: GNUnet/src/transports/ip.c
===================================================================
--- GNUnet/src/transports/ip.c  2007-06-10 00:16:16 UTC (rev 4997)
+++ GNUnet/src/transports/ip.c  2007-06-10 03:07:30 UTC (rev 4998)
@@ -20,7 +20,7 @@
 
 /**
  * @file transports/ip.c
- * @brief code to determine the IP of the local machine
+ * @brief code to determine thep IP of the local machine
  *        and to do DNS resolution (with caching)
  *
  * @author Christian Grothoff
@@ -159,11 +159,20 @@
                         sa,
                         salen) ) ) ) {
     if (cache->last_request + 60 * cronMINUTES < now) {
-      prev->next = cache->next;
-      FREENONNULL(cache->addr);
-      FREE(cache->sa);
-      FREE(cache);
-      cache = prev;
+      if (prev != NULL) {
+       prev->next = cache->next;
+       FREENONNULL(cache->addr);
+       FREE(cache->sa);
+       FREE(cache);      
+       cache = prev->next;
+      } else {
+       head = cache->next;
+       FREENONNULL(cache->addr);
+       FREE(cache->sa);
+       FREE(cache);      
+       cache = head;   
+      }
+      continue;
     }    
     prev = cache;
     cache = cache->next;





reply via email to

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