diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-22 00:45:03 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-06-22 00:45:07 +0200 |
commit | f37f5b281184efba9929ff0453079f1795573671 (patch) | |
tree | fee47318732e4a730faece29556cb29de681ddbf /src/namestore/gnunet-service-namestore.c | |
parent | 8137c9abcf3e3f3a457330fbfdb4d5f09572ddb1 (diff) | |
download | gnunet-f37f5b281184efba9929ff0453079f1795573671.tar.gz gnunet-f37f5b281184efba9929ff0453079f1795573671.zip |
avoid pk operation unless logging enabled
Diffstat (limited to 'src/namestore/gnunet-service-namestore.c')
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index d2a09087e..1de3a3edf 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -615,10 +615,22 @@ get_nick_record (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone) | |||
615 | if ( (GNUNET_OK != res) || | 615 | if ( (GNUNET_OK != res) || |
616 | (NULL == nick) ) | 616 | (NULL == nick) ) |
617 | { | 617 | { |
618 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, &pub); | 618 | static int do_log = GNUNET_LOG_CALL_STATUS; |
619 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, | 619 | |
620 | "No nick name set for zone `%s'\n", | 620 | if (0 == do_log) |
621 | GNUNET_GNSRECORD_z2s (&pub)); | 621 | do_log |
622 | = GNUNET_get_log_call_status (GNUNET_ERROR_TYPE_DEBUG, | ||
623 | "namestore", | ||
624 | __FILE__, | ||
625 | __FUNCTION__, | ||
626 | __LINE__); | ||
627 | if (1 == do_log) | ||
628 | { | ||
629 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, &pub); | ||
630 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, | ||
631 | "No nick name set for zone `%s'\n", | ||
632 | GNUNET_GNSRECORD_z2s (&pub)); | ||
633 | } | ||
622 | return NULL; | 634 | return NULL; |
623 | } | 635 | } |
624 | 636 | ||