projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4936b6
)
permit NULL addrgen
author
Christian Grothoff
<christian@grothoff.org>
Sat, 13 Feb 2010 23:49:06 +0000
(23:49 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Sat, 13 Feb 2010 23:49:06 +0000
(23:49 +0000)
src/hello/hello.c
patch
|
blob
|
history
diff --git
a/src/hello/hello.c
b/src/hello/hello.c
index a7aaf7d54790330eec7ad6cb481f992848857999..2a99234db7ae5d42984104786993b4175e9a2f41 100644
(file)
--- a/
src/hello/hello.c
+++ b/
src/hello/hello.c
@@
-176,10
+176,13
@@
GNUNET_HELLO_create (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
max = sizeof (buffer);
used = 0;
-
while (0 != (ret = addrgen (addrgen_cls, max, &buffer[used]))
)
+
if (addrgen != NULL
)
{
- max -= ret;
- used += ret;
+ while (0 != (ret = addrgen (addrgen_cls, max, &buffer[used])))
+ {
+ max -= ret;
+ used += ret;
+ }
}
hello = GNUNET_malloc (sizeof (struct GNUNET_HELLO_Message) + used);
hello->header.type = htons (GNUNET_MESSAGE_TYPE_HELLO);