diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-06-10 15:38:43 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-06-10 15:38:43 +0000 |
commit | 76e8462020b7ed63330fd0f115307ba76806a0a0 (patch) | |
tree | 38b2dbd7b59a6948c4a4a31909de97e6e6db3e6c /src/transport/plugin_transport_tcp.c | |
parent | babfa78349fe8442fa0c85ad73e10cebafc42075 (diff) | |
download | gnunet-76e8462020b7ed63330fd0f115307ba76806a0a0.tar.gz gnunet-76e8462020b7ed63330fd0f115307ba76806a0a0.zip |
fix segfault
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 689cb3784..4ded5aadd 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -1813,15 +1813,18 @@ handle_tcp_nat_probe (void *cls, | |||
1813 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 1813 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
1814 | return; | 1814 | return; |
1815 | } | 1815 | } |
1816 | |||
1817 | tcp_nat_probe = (const struct TCP_NAT_ProbeMessage *)message; | ||
1818 | |||
1816 | if (0 == memcmp (&tcp_nat_probe->clientIdentity, | 1819 | if (0 == memcmp (&tcp_nat_probe->clientIdentity, |
1817 | plugin->env->my_identity, | 1820 | plugin->env->my_identity, |
1818 | sizeof (struct GNUNET_PeerIdentity))) | 1821 | sizeof (struct GNUNET_PeerIdentity))) |
1819 | { | 1822 | { |
1820 | /* refuse connections from ourselves */ | 1823 | /* refuse connections from ourselves */ |
1821 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 1824 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
1822 | return; | 1825 | return; |
1823 | } | 1826 | } |
1824 | tcp_nat_probe = (const struct TCP_NAT_ProbeMessage *)message; | 1827 | |
1825 | session = GNUNET_CONTAINER_multihashmap_get(plugin->nat_wait_conns, | 1828 | session = GNUNET_CONTAINER_multihashmap_get(plugin->nat_wait_conns, |
1826 | &tcp_nat_probe->clientIdentity.hashPubKey); | 1829 | &tcp_nat_probe->clientIdentity.hashPubKey); |
1827 | if (session == NULL) | 1830 | if (session == NULL) |