gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r27961 - gnunet/src/transport
Date: Fri, 12 Jul 2013 16:45:25 +0200

Author: wachs
Date: 2013-07-12 16:45:25 +0200 (Fri, 12 Jul 2013)
New Revision: 27961

Modified:
   gnunet/src/transport/plugin_transport_udp.c
Log:
fixing crash


Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2013-07-12 14:42:09 UTC (rev 
27960)
+++ gnunet/src/transport/plugin_transport_udp.c 2013-07-12 14:45:25 UTC (rev 
27961)
@@ -1341,6 +1341,10 @@
   case sizeof (struct IPv4UdpAddress):
     if (NULL == plugin->sockv4)
     {
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Could not create session for peer `%s' address `%s': IPv4 is not 
enabled\n",
+           GNUNET_i2s(target),
+           udp_address_to_string(NULL, addr, addrlen));
       return NULL;
     }
     t4 = addr;
@@ -1358,6 +1362,10 @@
   case sizeof (struct IPv6UdpAddress):
     if (NULL == plugin->sockv6)
     {
+      LOG (GNUNET_ERROR_TYPE_INFO,
+           "Could not create session for peer `%s' address `%s': IPv6 is not 
enabled\n",
+           GNUNET_i2s(target),
+           udp_address_to_string(NULL, addr, addrlen));
       return NULL;
     }
     t6 = addr;
@@ -1529,6 +1537,8 @@
       address->address,
       address->address_length,
       NULL, NULL);
+  if (NULL == s)
+       return NULL; /* protocol not supported or address invalid */
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Creating new session %p for peer `%s' address `%s'\n",
        s,




reply via email to

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