From: Christian Grothoff Date: Sat, 13 Feb 2010 23:49:06 +0000 (+0000) Subject: permit NULL addrgen X-Git-Tag: initial-import-from-subversion-38251~22732 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3e2673ea17900dc4f078bb8b147678ca66e783d7;p=oweals%2Fgnunet.git permit NULL addrgen --- diff --git a/src/hello/hello.c b/src/hello/hello.c index a7aaf7d54..2a99234db 100644 --- 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);