diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-02 11:09:33 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-02 11:09:33 +0000 |
commit | 9336010863e2fddb329675148e090de718b6d5b7 (patch) | |
tree | b97611138ebfdc26984d4748448457cfad39a435 /src/namestore/test_namestore_api_put.c | |
parent | a9a895d090282d08c58460f20cab807337e82109 (diff) | |
download | gnunet-9336010863e2fddb329675148e090de718b6d5b7.tar.gz gnunet-9336010863e2fddb329675148e090de718b6d5b7.zip |
- create test
Diffstat (limited to 'src/namestore/test_namestore_api_put.c')
-rw-r--r-- | src/namestore/test_namestore_api_put.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/namestore/test_namestore_api_put.c b/src/namestore/test_namestore_api_put.c index f65b533b3..3e8db7445 100644 --- a/src/namestore/test_namestore_api_put.c +++ b/src/namestore/test_namestore_api_put.c | |||
@@ -43,7 +43,7 @@ static struct GNUNET_OS_Process *arm; | |||
43 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 43 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; |
44 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 44 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; |
45 | 45 | ||
46 | struct GNUNET_NAMESTORE_RecordData *s_rd; | 46 | struct GNUNET_NAMESTORE_RecordData *first_record; |
47 | 47 | ||
48 | static int res; | 48 | static int res; |
49 | 49 | ||
@@ -191,23 +191,23 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
191 | 191 | ||
192 | /* create record */ | 192 | /* create record */ |
193 | char * s_name = "dummy.dummy.gnunet"; | 193 | char * s_name = "dummy.dummy.gnunet"; |
194 | s_rd = create_record (RECORDS); | 194 | first_record = create_record (RECORDS); |
195 | 195 | ||
196 | signature = GNUNET_NAMESTORE_create_signature(privkey, s_name, s_rd, RECORDS); | 196 | signature = GNUNET_NAMESTORE_create_signature(privkey, s_name, first_record, RECORDS); |
197 | 197 | ||
198 | GNUNET_break (s_rd != NULL); | 198 | GNUNET_break (first_record != NULL); |
199 | GNUNET_break (s_name != NULL); | 199 | GNUNET_break (s_name != NULL); |
200 | 200 | ||
201 | GNUNET_NAMESTORE_record_put (nsh, &pubkey, s_name, | 201 | GNUNET_NAMESTORE_record_put (nsh, &pubkey, s_name, |
202 | GNUNET_TIME_absolute_get_forever(), | 202 | GNUNET_TIME_absolute_get_forever(), |
203 | RECORDS, s_rd, signature, put_cont, s_name); | 203 | RECORDS, first_record, signature, put_cont, s_name); |
204 | 204 | ||
205 | GNUNET_free (signature); | 205 | GNUNET_free (signature); |
206 | 206 | ||
207 | int c; | 207 | int c; |
208 | for (c = 0; c < RECORDS; c++) | 208 | for (c = 0; c < RECORDS; c++) |
209 | GNUNET_free_non_null((void *) s_rd[c].data); | 209 | GNUNET_free_non_null((void *) first_record[c].data); |
210 | GNUNET_free (s_rd); | 210 | GNUNET_free (first_record); |
211 | 211 | ||
212 | } | 212 | } |
213 | 213 | ||