aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_hello.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-06-03 09:34:15 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-06-03 09:34:15 +0000
commit7d6e6b045a300cf753e685bc18ec0b1e264d1a25 (patch)
tree2e7069a9bfb46aef0ea9a45b944fbc934aaa2ce1 /src/transport/gnunet-service-transport_hello.c
parent84bcdbdd34bfa4d597ae2635146fe15631b46f44 (diff)
downloadgnunet-7d6e6b045a300cf753e685bc18ec0b1e264d1a25.tar.gz
gnunet-7d6e6b045a300cf753e685bc18ec0b1e264d1a25.zip
fix for bug #0003416: do not stop parsing uri when plugin is not found
- changed semantics for address generator cb: GNUNET_SYSERR indicates stop, >= 0 indicates bytes added
Diffstat (limited to 'src/transport/gnunet-service-transport_hello.c')
-rw-r--r--src/transport/gnunet-service-transport_hello.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index 626be54c1..49992222d 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -133,17 +133,18 @@ struct GeneratorContext
133 * @param cls the 'struct GeneratorContext' 133 * @param cls the 'struct GeneratorContext'
134 * @param max maximum number of bytes left 134 * @param max maximum number of bytes left
135 * @param buf where to write the address 135 * @param buf where to write the address
136 * @return bytes written or GNUNET_SYSERR to signal the
137 * end of the iteration.
136 */ 138 */
137static size_t 139static ssize_t
138address_generator (void *cls, size_t max, void *buf) 140address_generator (void *cls, size_t max, void *buf)
139{ 141{
140 struct GeneratorContext *gc = cls; 142 struct GeneratorContext *gc = cls;
141 size_t ret; 143 ssize_t ret;
142 144
143 if (NULL == gc->addr_pos) 145 if (NULL == gc->addr_pos)
144 return 0; 146 return GNUNET_SYSERR; /* Done */
145 ret = 147 ret = GNUNET_HELLO_add_address (gc->addr_pos->address, gc->expiration, buf,
146 GNUNET_HELLO_add_address (gc->addr_pos->address, gc->expiration, buf,
147 max); 148 max);
148 gc->addr_pos = gc->addr_pos->next; 149 gc->addr_pos = gc->addr_pos->next;
149 return ret; 150 return ret;