diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-07-12 14:45:25 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-07-12 14:45:25 +0000 |
commit | 2af741aac1846c6303b7c223e8e451c66e9d42f0 (patch) | |
tree | 7cef4530a5560cd3dee865ed367e11f4f8ae7dcd /src/transport/plugin_transport_udp.c | |
parent | 55ae6709a22039e980134c55bc500573d9e111f3 (diff) | |
download | gnunet-2af741aac1846c6303b7c223e8e451c66e9d42f0.tar.gz gnunet-2af741aac1846c6303b7c223e8e451c66e9d42f0.zip |
fixing crash
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 925159a76..f4630c071 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -1341,6 +1341,10 @@ create_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target, | |||
1341 | case sizeof (struct IPv4UdpAddress): | 1341 | case sizeof (struct IPv4UdpAddress): |
1342 | if (NULL == plugin->sockv4) | 1342 | if (NULL == plugin->sockv4) |
1343 | { | 1343 | { |
1344 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
1345 | "Could not create session for peer `%s' address `%s': IPv4 is not enabled\n", | ||
1346 | GNUNET_i2s(target), | ||
1347 | udp_address_to_string(NULL, addr, addrlen)); | ||
1344 | return NULL; | 1348 | return NULL; |
1345 | } | 1349 | } |
1346 | t4 = addr; | 1350 | t4 = addr; |
@@ -1358,6 +1362,10 @@ create_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target, | |||
1358 | case sizeof (struct IPv6UdpAddress): | 1362 | case sizeof (struct IPv6UdpAddress): |
1359 | if (NULL == plugin->sockv6) | 1363 | if (NULL == plugin->sockv6) |
1360 | { | 1364 | { |
1365 | LOG (GNUNET_ERROR_TYPE_INFO, | ||
1366 | "Could not create session for peer `%s' address `%s': IPv6 is not enabled\n", | ||
1367 | GNUNET_i2s(target), | ||
1368 | udp_address_to_string(NULL, addr, addrlen)); | ||
1361 | return NULL; | 1369 | return NULL; |
1362 | } | 1370 | } |
1363 | t6 = addr; | 1371 | t6 = addr; |
@@ -1529,6 +1537,8 @@ udp_plugin_create_session (void *cls, | |||
1529 | address->address, | 1537 | address->address, |
1530 | address->address_length, | 1538 | address->address_length, |
1531 | NULL, NULL); | 1539 | NULL, NULL); |
1540 | if (NULL == s) | ||
1541 | return NULL; /* protocol not supported or address invalid */ | ||
1532 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1542 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1533 | "Creating new session %p for peer `%s' address `%s'\n", | 1543 | "Creating new session %p for peer `%s' address `%s'\n", |
1534 | s, | 1544 | s, |