diff options
Diffstat (limited to 'src/fs/test_fs_namespace_list_updateable.c')
-rw-r--r-- | src/fs/test_fs_namespace_list_updateable.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/fs/test_fs_namespace_list_updateable.c b/src/fs/test_fs_namespace_list_updateable.c index 4311f0110..2132220fb 100644 --- a/src/fs/test_fs_namespace_list_updateable.c +++ b/src/fs/test_fs_namespace_list_updateable.c | |||
@@ -33,7 +33,7 @@ static struct GNUNET_FS_Handle *fs; | |||
33 | 33 | ||
34 | static int err; | 34 | static int err; |
35 | 35 | ||
36 | static struct GNUNET_CRYPTO_EcdsaPrivateKey *ns; | 36 | static struct GNUNET_CRYPTO_EcdsaPrivateKey ns; |
37 | 37 | ||
38 | static struct GNUNET_CONTAINER_MetaData *meta; | 38 | static struct GNUNET_CONTAINER_MetaData *meta; |
39 | 39 | ||
@@ -58,8 +58,6 @@ do_shutdown () | |||
58 | GNUNET_FS_uri_destroy (uri_this); | 58 | GNUNET_FS_uri_destroy (uri_this); |
59 | if (uri_next != NULL) | 59 | if (uri_next != NULL) |
60 | GNUNET_FS_uri_destroy (uri_next); | 60 | GNUNET_FS_uri_destroy (uri_next); |
61 | if (ns != NULL) | ||
62 | GNUNET_free (ns); | ||
63 | if (meta != NULL) | 61 | if (meta != NULL) |
64 | GNUNET_CONTAINER_meta_data_destroy (meta); | 62 | GNUNET_CONTAINER_meta_data_destroy (meta); |
65 | } | 63 | } |
@@ -87,7 +85,7 @@ check_this_next (void *cls, const char *last_id, | |||
87 | GNUNET_break (0 == strcmp (next_id, "next")); | 85 | GNUNET_break (0 == strcmp (next_id, "next")); |
88 | err -= 2; | 86 | err -= 2; |
89 | err += 4; | 87 | err += 4; |
90 | GNUNET_FS_namespace_list_updateable (fs, ns, next_id, &check_next, NULL); | 88 | GNUNET_FS_namespace_list_updateable (fs, &ns, next_id, &check_next, NULL); |
91 | } | 89 | } |
92 | 90 | ||
93 | 91 | ||
@@ -96,7 +94,7 @@ sks_cont_next (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg) | |||
96 | { | 94 | { |
97 | GNUNET_assert (NULL == emsg); | 95 | GNUNET_assert (NULL == emsg); |
98 | err += 2; | 96 | err += 2; |
99 | GNUNET_FS_namespace_list_updateable (fs, ns, NULL, &check_this_next, NULL); | 97 | GNUNET_FS_namespace_list_updateable (fs, &ns, NULL, &check_this_next, NULL); |
100 | } | 98 | } |
101 | 99 | ||
102 | 100 | ||
@@ -117,17 +115,17 @@ sks_cont_this (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg) | |||
117 | { | 115 | { |
118 | GNUNET_assert (NULL == emsg); | 116 | GNUNET_assert (NULL == emsg); |
119 | err = 1; | 117 | err = 1; |
120 | GNUNET_FS_namespace_list_updateable (fs, ns, NULL, &check_this, NULL); | 118 | GNUNET_FS_namespace_list_updateable (fs, &ns, NULL, &check_this, NULL); |
121 | GNUNET_FS_publish_sks (fs, ns, "next", "future", meta, uri_next, &bo, | 119 | GNUNET_FS_publish_sks (fs, |
120 | &ns, "next", "future", meta, uri_next, &bo, | ||
122 | GNUNET_FS_PUBLISH_OPTION_NONE, &sks_cont_next, NULL); | 121 | GNUNET_FS_PUBLISH_OPTION_NONE, &sks_cont_next, NULL); |
123 | } | 122 | } |
124 | 123 | ||
125 | 124 | ||
126 | static void | 125 | static void |
127 | testNamespace () | 126 | testNamespace (void) |
128 | { | 127 | { |
129 | ns = GNUNET_CRYPTO_ecdsa_key_create (); | 128 | GNUNET_CRYPTO_ecdsa_key_create (&ns); |
130 | GNUNET_assert (NULL != ns); | ||
131 | bo.content_priority = 1; | 129 | bo.content_priority = 1; |
132 | bo.anonymity_level = 1; | 130 | bo.anonymity_level = 1; |
133 | bo.replication_level = 0; | 131 | bo.replication_level = 0; |
@@ -145,7 +143,8 @@ testNamespace () | |||
145 | ( | 143 | ( |
146 | "gnunet://fs/chk/C282GG70GKK41O4551011DO413KFBVTVMQG1OG30I0K4045N0G41HAPB82G680A02JRVVFO8URVRU2F159011DO41000000022RG820.RNVVVVOOLCLK065B5D04HTNVNSIB2AI022RG8200HSLK1CO1000ATQ98824DMA2032LIMG50CG0K057NVUVG200000H000004400000.43", | 144 | "gnunet://fs/chk/C282GG70GKK41O4551011DO413KFBVTVMQG1OG30I0K4045N0G41HAPB82G680A02JRVVFO8URVRU2F159011DO41000000022RG820.RNVVVVOOLCLK065B5D04HTNVNSIB2AI022RG8200HSLK1CO1000ATQ98824DMA2032LIMG50CG0K057NVUVG200000H000004400000.43", |
147 | NULL); | 145 | NULL); |
148 | GNUNET_FS_publish_sks (fs, ns, "this", "next", meta, uri_this, &bo, | 146 | GNUNET_FS_publish_sks (fs, |
147 | &ns, "this", "next", meta, uri_this, &bo, | ||
149 | GNUNET_FS_PUBLISH_OPTION_NONE, &sks_cont_this, NULL); | 148 | GNUNET_FS_PUBLISH_OPTION_NONE, &sks_cont_this, NULL); |
150 | } | 149 | } |
151 | 150 | ||