diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-02-04 18:51:36 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-02-04 18:51:36 +0000 |
commit | df9733ded851cfa9ed0c81ce4c99dc6911da492e (patch) | |
tree | 9474c072f30134b608b508e2ac4bbbd339326007 /src/mesh | |
parent | 3f3bb638d5678212e67a7c1204fb75a9e081d83b (diff) | |
download | gnunet-df9733ded851cfa9ed0c81ce4c99dc6911da492e.tar.gz gnunet-df9733ded851cfa9ed0c81ce4c99dc6911da492e.zip |
- don't call set on NULL hellos
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh_hello.c | 5 | ||||
-rw-r--r-- | src/mesh/gnunet-service-mesh_peer.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mesh/gnunet-service-mesh_hello.c b/src/mesh/gnunet-service-mesh_hello.c index c380b0f31..bde6592d6 100644 --- a/src/mesh/gnunet-service-mesh_hello.c +++ b/src/mesh/gnunet-service-mesh_hello.c | |||
@@ -106,6 +106,11 @@ got_hello (void *cls, const struct GNUNET_PeerIdentity *id, | |||
106 | return; | 106 | return; |
107 | } | 107 | } |
108 | LOG (GNUNET_ERROR_TYPE_DEBUG, " hello for %s\n", GNUNET_i2s (id)); | 108 | LOG (GNUNET_ERROR_TYPE_DEBUG, " hello for %s\n", GNUNET_i2s (id)); |
109 | if (NULL == hello) | ||
110 | { | ||
111 | LOG (GNUNET_ERROR_TYPE_DEBUG, " hello is NULL\n"); | ||
112 | return; | ||
113 | } | ||
109 | peer = GMP_get (id); | 114 | peer = GMP_get (id); |
110 | GMP_set_hello (peer, hello); | 115 | GMP_set_hello (peer, hello); |
111 | 116 | ||
diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c index ef5912ba6..3cf84ab75 100644 --- a/src/mesh/gnunet-service-mesh_peer.c +++ b/src/mesh/gnunet-service-mesh_peer.c | |||
@@ -1890,7 +1890,7 @@ GMP_set_hello (struct MeshPeer *peer, const struct GNUNET_HELLO_Message *hello) | |||
1890 | 1890 | ||
1891 | if (NULL == hello) | 1891 | if (NULL == hello) |
1892 | return; | 1892 | return; |
1893 | 1893 | ||
1894 | old = GMP_get_hello (peer); | 1894 | old = GMP_get_hello (peer); |
1895 | if (NULL == old) | 1895 | if (NULL == old) |
1896 | { | 1896 | { |