summaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_hello.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-07-31 06:58:55 +0000
committerBart Polot <bart@net.in.tum.de>2015-07-31 06:58:55 +0000
commitc14ff64b5c9ca4cfc5004e30622499cc782694c5 (patch)
tree85f5f098c4054fccffcf56159e3543cf1d252c48 /src/cadet/gnunet-service-cadet_hello.c
parent5eb722ace41a4cccf9d65bf408cfd3c45756cf2f (diff)
downloadgnunet-c14ff64b5c9ca4cfc5004e30622499cc782694c5.tar.gz
gnunet-c14ff64b5c9ca4cfc5004e30622499cc782694c5.zip
- refactor GCP_get_peer, fix get peer info
Diffstat (limited to 'src/cadet/gnunet-service-cadet_hello.c')
-rw-r--r--src/cadet/gnunet-service-cadet_hello.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet_hello.c b/src/cadet/gnunet-service-cadet_hello.c
index 9229483fe..19b45c9cd 100644
--- a/src/cadet/gnunet-service-cadet_hello.c
+++ b/src/cadet/gnunet-service-cadet_hello.c
@@ -108,7 +108,7 @@ got_hello (void *cls, const struct GNUNET_PeerIdentity *id,
108 LOG (GNUNET_ERROR_TYPE_DEBUG, " hello for %s (%d bytes), expires on %s\n", 108 LOG (GNUNET_ERROR_TYPE_DEBUG, " hello for %s (%d bytes), expires on %s\n",
109 GNUNET_i2s (id), GNUNET_HELLO_size (hello), 109 GNUNET_i2s (id), GNUNET_HELLO_size (hello),
110 GNUNET_STRINGS_absolute_time_to_string (GNUNET_HELLO_get_last_expiration(hello))); 110 GNUNET_STRINGS_absolute_time_to_string (GNUNET_HELLO_get_last_expiration(hello)));
111 peer = GCP_get (id); 111 peer = GCP_get (id, GNUNET_YES);
112 GCP_set_hello (peer, hello); 112 GCP_set_hello (peer, hello);
113 113
114 if (GCP_get_short_id (peer) == myid) 114 if (GCP_get_short_id (peer) == myid)
@@ -176,7 +176,12 @@ GCH_get_mine (void)
176const struct GNUNET_HELLO_Message * 176const struct GNUNET_HELLO_Message *
177GCH_get (const struct GNUNET_PeerIdentity *id) 177GCH_get (const struct GNUNET_PeerIdentity *id)
178{ 178{
179 return GCP_get_hello (GCP_get (id)); 179 struct CadetPeer *p;
180
181 p = GCP_get (id, GNUNET_NO);
182 if (NULL == p)
183 return NULL;
184 return GCP_get_hello (p);
180} 185}
181 186
182 187