aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_cname_lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_gns_cname_lookup.c')
-rw-r--r--src/gns/test_gns_cname_lookup.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gns/test_gns_cname_lookup.c b/src/gns/test_gns_cname_lookup.c
index f1045fda7..9cc87d5c6 100644
--- a/src/gns/test_gns_cname_lookup.c
+++ b/src/gns/test_gns_cname_lookup.c
@@ -115,7 +115,7 @@ on_lookup_result_cname (void *cls, uint32_t rd_count,
115 for (i=0; i<rd_count; i++) 115 for (i=0; i<rd_count; i++)
116 { 116 {
117 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type); 117 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
118 if (rd[i].record_type == GNUNET_GNS_RECORD_TYPE_CNAME) 118 if (rd[i].record_type == GNUNET_GNS_RECORD_CNAME)
119 { 119 {
120 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CNAME: %s\n", rd[i].data); 120 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CNAME: %s\n", rd[i].data);
121 if (0 == strcmp(rd[i].data, TEST_RECORD_CNAME_SERVER)) 121 if (0 == strcmp(rd[i].data, TEST_RECORD_CNAME_SERVER))
@@ -157,7 +157,7 @@ on_lookup_result_dns (void *cls, uint32_t rd_count,
157 for (i=0; i<rd_count; i++) 157 for (i=0; i<rd_count; i++)
158 { 158 {
159 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type); 159 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
160 if (rd[i].record_type == GNUNET_GNS_RECORD_TYPE_A) 160 if (rd[i].record_type == GNUNET_GNS_RECORD_A)
161 { 161 {
162 memcpy(&a, rd[i].data, sizeof(a)); 162 memcpy(&a, rd[i].data, sizeof(a));
163 addr = inet_ntoa(a); 163 addr = inet_ntoa(a);
@@ -176,7 +176,7 @@ on_lookup_result_dns (void *cls, uint32_t rd_count,
176 } 176 }
177 } 177 }
178 178
179 GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_PLUS, GNUNET_GNS_RECORD_TYPE_CNAME, 179 GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_PLUS, GNUNET_GNS_RECORD_CNAME,
180 GNUNET_YES, 180 GNUNET_YES,
181 NULL, 181 NULL,
182 &on_lookup_result_cname, TEST_DOMAIN_PLUS); 182 &on_lookup_result_cname, TEST_DOMAIN_PLUS);
@@ -203,7 +203,7 @@ on_lookup_result_zkey (void *cls, uint32_t rd_count,
203 for (i=0; i<rd_count; i++) 203 for (i=0; i<rd_count; i++)
204 { 204 {
205 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type); 205 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
206 if (rd[i].record_type == GNUNET_GNS_RECORD_TYPE_A) 206 if (rd[i].record_type == GNUNET_GNS_RECORD_A)
207 { 207 {
208 memcpy(&a, rd[i].data, sizeof(a)); 208 memcpy(&a, rd[i].data, sizeof(a));
209 addr = inet_ntoa(a); 209 addr = inet_ntoa(a);
@@ -222,7 +222,7 @@ on_lookup_result_zkey (void *cls, uint32_t rd_count,
222 } 222 }
223 } 223 }
224 224
225 GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN_DNS, GNUNET_GNS_RECORD_TYPE_A, 225 GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN_DNS, GNUNET_GNS_RECORD_A,
226 GNUNET_YES, 226 GNUNET_YES,
227 NULL, 227 NULL,
228 &on_lookup_result_dns, TEST_DOMAIN_DNS); 228 &on_lookup_result_dns, TEST_DOMAIN_DNS);
@@ -249,7 +249,7 @@ on_lookup_result_plus (void *cls, uint32_t rd_count,
249 for (i=0; i<rd_count; i++) 249 for (i=0; i<rd_count; i++)
250 { 250 {
251 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type); 251 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
252 if (rd[i].record_type == GNUNET_GNS_RECORD_TYPE_A) 252 if (rd[i].record_type == GNUNET_GNS_RECORD_A)
253 { 253 {
254 memcpy(&a, rd[i].data, sizeof(a)); 254 memcpy(&a, rd[i].data, sizeof(a));
255 addr = inet_ntoa(a); 255 addr = inet_ntoa(a);
@@ -268,7 +268,7 @@ on_lookup_result_plus (void *cls, uint32_t rd_count,
268 } 268 }
269 } 269 }
270 270
271 GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN_ZKEY, GNUNET_GNS_RECORD_TYPE_A, 271 GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN_ZKEY, GNUNET_GNS_RECORD_A,
272 GNUNET_YES, 272 GNUNET_YES,
273 NULL, 273 NULL,
274 &on_lookup_result_zkey, TEST_DOMAIN_ZKEY); 274 &on_lookup_result_zkey, TEST_DOMAIN_ZKEY);
@@ -300,7 +300,7 @@ commence_testing (void *cls, int32_t success, const char *emsg)
300 ok = 2; 300 ok = 2;
301 } 301 }
302 302
303 GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN_PLUS, GNUNET_GNS_RECORD_TYPE_A, 303 GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN_PLUS, GNUNET_GNS_RECORD_A,
304 GNUNET_YES, 304 GNUNET_YES,
305 NULL, 305 NULL,
306 &on_lookup_result_plus, TEST_DOMAIN_PLUS); 306 &on_lookup_result_plus, TEST_DOMAIN_PLUS);
@@ -393,7 +393,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
393 393
394 rd.data_size = strlen (TEST_RECORD_CNAME_PLUS); 394 rd.data_size = strlen (TEST_RECORD_CNAME_PLUS);
395 rd.data = TEST_RECORD_CNAME_PLUS; 395 rd.data = TEST_RECORD_CNAME_PLUS;
396 rd.record_type = GNUNET_GNS_RECORD_TYPE_CNAME; 396 rd.record_type = GNUNET_GNS_RECORD_CNAME;
397 397
398 GNUNET_NAMESTORE_record_create (namestore_handle, 398 GNUNET_NAMESTORE_record_create (namestore_handle,
399 alice_key, 399 alice_key,
@@ -404,7 +404,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
404 404
405 rd.data_size = strlen (TEST_RECORD_CNAME_ZKEY); 405 rd.data_size = strlen (TEST_RECORD_CNAME_ZKEY);
406 rd.data = TEST_RECORD_CNAME_ZKEY; 406 rd.data = TEST_RECORD_CNAME_ZKEY;
407 rd.record_type = GNUNET_GNS_RECORD_TYPE_CNAME; 407 rd.record_type = GNUNET_GNS_RECORD_CNAME;
408 408
409 GNUNET_NAMESTORE_record_create (namestore_handle, 409 GNUNET_NAMESTORE_record_create (namestore_handle,
410 alice_key, 410 alice_key,
@@ -415,7 +415,7 @@ do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
415 415
416 rd.data_size = strlen (TEST_RECORD_CNAME_DNS); 416 rd.data_size = strlen (TEST_RECORD_CNAME_DNS);
417 rd.data = TEST_RECORD_CNAME_DNS; 417 rd.data = TEST_RECORD_CNAME_DNS;
418 rd.record_type = GNUNET_GNS_RECORD_TYPE_CNAME; 418 rd.record_type = GNUNET_GNS_RECORD_CNAME;
419 419
420 GNUNET_NAMESTORE_record_create (namestore_handle, 420 GNUNET_NAMESTORE_record_create (namestore_handle,
421 alice_key, 421 alice_key,