aboutsummaryrefslogtreecommitdiff
path: root/src/identity/identity_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-06-01 00:58:06 +0200
committerChristian Grothoff <christian@grothoff.org>2019-06-01 00:58:06 +0200
commit9f03df3be26e78853cc0d2288d2260b9032126cb (patch)
tree3f3809083ed421258532aa0411501afc0941e80c /src/identity/identity_api.c
parent47a7c12c47fa10728494623ea8f89beab8e5cd77 (diff)
downloadgnunet-9f03df3be26e78853cc0d2288d2260b9032126cb.tar.gz
gnunet-9f03df3be26e78853cc0d2288d2260b9032126cb.zip
improve performance of identity_api_lookup.c logic to not be O(n)
Diffstat (limited to 'src/identity/identity_api.c')
-rw-r--r--src/identity/identity_api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c
index fa7c8b023..c463da641 100644
--- a/src/identity/identity_api.c
+++ b/src/identity/identity_api.c
@@ -596,6 +596,7 @@ GNUNET_IDENTITY_get (struct GNUNET_IDENTITY_Handle *h,
596 596
597 if (NULL == h->mq) 597 if (NULL == h->mq)
598 return NULL; 598 return NULL;
599 GNUNET_assert (NULL != h->cb);
599 slen = strlen (service_name) + 1; 600 slen = strlen (service_name) + 1;
600 if (slen >= GNUNET_MAX_MESSAGE_SIZE - sizeof (struct GetDefaultMessage)) 601 if (slen >= GNUNET_MAX_MESSAGE_SIZE - sizeof (struct GetDefaultMessage))
601 { 602 {
@@ -641,6 +642,7 @@ GNUNET_IDENTITY_set (struct GNUNET_IDENTITY_Handle *h,
641 642
642 if (NULL == h->mq) 643 if (NULL == h->mq)
643 return NULL; 644 return NULL;
645 GNUNET_assert (NULL != h->cb);
644 slen = strlen (service_name) + 1; 646 slen = strlen (service_name) + 1;
645 if (slen >= GNUNET_MAX_MESSAGE_SIZE - sizeof (struct SetDefaultMessage)) 647 if (slen >= GNUNET_MAX_MESSAGE_SIZE - sizeof (struct SetDefaultMessage))
646 { 648 {