summaryrefslogtreecommitdiff
path: root/src/gns/gns_api.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2012-03-15 11:25:16 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2012-03-15 11:25:16 +0000
commit0bc07e291340de87cd9fe6bca0a6e62720017cb5 (patch)
treed1e0553f479c7a156a731443c466170ac3e42569 /src/gns/gns_api.c
parent06ab78ee651fdda7cf37a7c012445bb087060a05 (diff)
downloadgnunet-0bc07e291340de87cd9fe6bca0a6e62720017cb5.tar.gz
gnunet-0bc07e291340de87cd9fe6bca0a6e62720017cb5.zip
-fix client receive, zonefile loading
Diffstat (limited to 'src/gns/gns_api.c')
-rw-r--r--src/gns/gns_api.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c
index 53b8feef7..bd77f378e 100644
--- a/src/gns/gns_api.c
+++ b/src/gns/gns_api.c
@@ -369,6 +369,8 @@ process_shorten_reply (struct GNUNET_GNS_QueueEntry *qe,
369 "Received shortened reply `%s' from GNS service\n", 369 "Received shortened reply `%s' from GNS service\n",
370 short_name); 370 short_name);
371 371
372 GNUNET_CLIENT_receive (h->client, &process_message, h,
373 GNUNET_TIME_UNIT_FOREVER_REL);
372 qe->shorten_proc(qe->proc_cls, short_name); 374 qe->shorten_proc(qe->proc_cls, short_name);
373 375
374} 376}
@@ -404,6 +406,8 @@ process_get_auth_reply (struct GNUNET_GNS_QueueEntry *qe,
404 "Received GET_AUTH reply `%s' from GNS service\n", 406 "Received GET_AUTH reply `%s' from GNS service\n",
405 auth_name); 407 auth_name);
406 408
409 GNUNET_CLIENT_receive (h->client, &process_message, h,
410 GNUNET_TIME_UNIT_FOREVER_REL);
407 qe->auth_proc(qe->proc_cls, auth_name); 411 qe->auth_proc(qe->proc_cls, auth_name);
408 412
409} 413}
@@ -444,6 +448,8 @@ process_lookup_reply (struct GNUNET_GNS_QueueEntry *qe,
444 "Received lookup reply from GNS service (count=%d)\n", 448 "Received lookup reply from GNS service (count=%d)\n",
445 ntohl(msg->rd_count)); 449 ntohl(msg->rd_count));
446 450
451 GNUNET_CLIENT_receive (h->client, &process_message, h,
452 GNUNET_TIME_UNIT_FOREVER_REL);
447 qe->lookup_proc(qe->proc_cls, rd_count, rd); 453 qe->lookup_proc(qe->proc_cls, rd_count, rd);
448} 454}
449 455
@@ -553,8 +559,6 @@ process_message (void *cls, const struct GNUNET_MessageHeader *msg)
553 process_get_auth_reply(qe, get_auth_msg); 559 process_get_auth_reply(qe, get_auth_msg);
554 } 560 }
555 561
556 GNUNET_CLIENT_receive (handle->client, &process_message, handle,
557 GNUNET_TIME_UNIT_FOREVER_REL);
558 562
559 if (GNUNET_YES == handle->reconnect) 563 if (GNUNET_YES == handle->reconnect)
560 force_reconnect (handle); 564 force_reconnect (handle);
@@ -575,9 +579,11 @@ GNUNET_GNS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
575 struct GNUNET_GNS_Handle *handle; 579 struct GNUNET_GNS_Handle *handle;
576 580
577 handle = GNUNET_malloc (sizeof (struct GNUNET_GNS_Handle)); 581 handle = GNUNET_malloc (sizeof (struct GNUNET_GNS_Handle));
582 handle->reconnect = GNUNET_NO;
578 handle->cfg = cfg; 583 handle->cfg = cfg;
579 reconnect (handle); 584 reconnect (handle);
580 //handle->reconnect_task = GNUNET_SCHEDULER_add_now (&reconnect_task, handle); 585 //handle->reconnect_task = GNUNET_SCHEDULER_add_now (&reconnect_task, handle);
586 handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
581 handle->r_id = 0; 587 handle->r_id = 0;
582 handle->in_receive = GNUNET_NO; 588 handle->in_receive = GNUNET_NO;
583 return handle; 589 return handle;
@@ -598,7 +604,7 @@ GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *h)
598 GNUNET_SCHEDULER_cancel (h->reconnect_task); 604 GNUNET_SCHEDULER_cancel (h->reconnect_task);
599 h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; 605 h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
600 } 606 }
601 GNUNET_free(h); 607 //GNUNET_free(h);
602 /* disco from GNS */ 608 /* disco from GNS */
603} 609}
604 610