From 25c895f688089de4fc570dd9f9a82d5d738581b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Thu, 7 Jun 2012 14:45:42 +0400
Subject: [PATCH] Make sure peerinfo API keeps receiving as long as there are
 contexts

---
 src/peerinfo/peerinfo_api.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c
index c13224e..d6ba0e6 100644
--- a/src/peerinfo/peerinfo_api.c
+++ b/src/peerinfo/peerinfo_api.c
@@ -515,6 +515,12 @@ peerinfo_handler (void *cls, const struct GNUNET_MessageHeader *msg)
     trigger_transmit (h);
     if (NULL != cb)
       cb (cb_cls, NULL, NULL, NULL);
+    if (h->ic_head != NULL)
+    {
+      h->in_receive = GNUNET_YES;
+      GNUNET_CLIENT_receive (h->client, &peerinfo_handler, h,
+          GNUNET_TIME_absolute_get_remaining (h->ic_head->timeout));
+    }
     return;
   }
 
-- 
1.7.4

