diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-11-29 23:58:44 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-11-29 23:58:44 +0100 |
commit | 70bd8df6c989a175c28c31a68227389e432cd2eb (patch) | |
tree | 73eee02b23147fd2d3b19fd812cf9f3a8f5dc466 | |
parent | 03d8657d530be561b321fd93d586f188cb61384b (diff) | |
download | sync-70bd8df6c989a175c28c31a68227389e432cd2eb.tar.gz sync-70bd8df6c989a175c28c31a68227389e432cd2eb.tar.bz2 sync-70bd8df6c989a175c28c31a68227389e432cd2eb.zip |
DCE
-rw-r--r-- | src/lib/test_sync_api.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/lib/test_sync_api.c b/src/lib/test_sync_api.c index fbbe0b1..4c4037d 100644 --- a/src/lib/test_sync_api.c +++ b/src/lib/test_sync_api.c @@ -156,59 +156,6 @@ static char *auditor_url; subject) -static struct GNUNET_CONTAINER_MultiHashMap *interned_strings; - -static const char * -intern (const char *str) -{ - struct GNUNET_HashCode hash; - const char *hs; - - if (NULL == interned_strings) - interned_strings = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_NO); - GNUNET_assert (NULL != interned_strings); - GNUNET_CRYPTO_hash (str, strlen (str), &hash); - hs = GNUNET_CONTAINER_multihashmap_get (interned_strings, &hash); - if (NULL != hs) - return hs; - hs = GNUNET_strdup (str); - GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put ( - interned_strings, - &hash, - (void *) hs, - GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); - return hs; -} - - -#define BUF_SZ 512 - -static const char * -merchant_url_internal (const char *instance_id) -{ - char buf[BUF_SZ]; - if (NULL == instance_id) - GNUNET_assert (0 < snprintf (buf, BUF_SZ, "%s", merchant_url)); - else - GNUNET_assert (0 < snprintf (buf, BUF_SZ, "%sinstances/%s/", merchant_url, - instance_id)); - return intern (buf); -} - - -static const char * -merchant_url_external (const char *instance_id) -{ - char buf[BUF_SZ]; - if (NULL == instance_id) - GNUNET_assert (0 < snprintf (buf, BUF_SZ, "%spublic/", merchant_url)); - else - GNUNET_assert (0 < snprintf (buf, BUF_SZ, "%spublic/instances/%s/", - merchant_url, instance_id)); - return intern (buf); -} - - /** * Main function that will tell the interpreter what commands to * run. |