#include "gnunet_protocols.h"
#include "gnunet_dht_service.h"
#include "dht.h"
-#include <gnunet_dnsparser_lib.h>
#define DEBUG_DHT_API GNUNET_EXTRA_LOGGING
if (ntohs (msg->type) != GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT)
{
if (process_monitor_message (handle, msg) == GNUNET_OK)
+ {
+ GNUNET_CLIENT_receive (handle->client, &service_message_handler, handle,
+ GNUNET_TIME_UNIT_FOREVER_REL);
return;
+ }
GNUNET_break (0);
do_disconnect (handle);
return;
h = GNUNET_malloc (sizeof (struct GNUNET_DHT_MonitorHandle));
GNUNET_CONTAINER_DLL_insert(handle->monitor_head, handle->monitor_tail, h);
+ GNUNET_assert (NULL != cb);
h->cb = cb;
h->cb_cls = cb_cls;
h->type = type;
pending->msg = &m->header;
pending->handle = handle;
pending->free_on_send = GNUNET_YES;
+ m->header.type = htons (GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET);
+ m->header.size = htons (sizeof (struct GNUNET_DHT_MonitorMessage));
+ m->type = htonl(type);
+ if (NULL != key)
+ memcpy (&m->key, key, sizeof(GNUNET_HashCode));
GNUNET_CONTAINER_DLL_insert (handle->pending_head, handle->pending_tail,
pending);
pending->in_pending_queue = GNUNET_YES;