#include <gnunet_dnsparser_lib.h>
#include <gnunet_namestore_service.h>
#include <gnunet_gns_service.h>
-#include <gnunet_w32nsp_lib.h>
+#include "gnunet_w32nsp_lib.h"
#include "w32resolver.h"
#include <nspapi.h>
#include <unistr.h>
*/
struct GNUNET_MessageHeader *msg;
- size_t msgsize;
-
/**
* Handle for the transmission request.
*/
tcc->th = NULL;
GNUNET_CONTAINER_DLL_remove (tcc_head, tcc_tail, tcc);
- msize = tcc->msgsize;
+ msize = ntohs (tcc->msg->size);
if (size == 0)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
* @param msg message to transmit, will be freed!
*/
static void
-transmit (struct GNUNET_SERVER_Client *client, struct GNUNET_MessageHeader *msg, size_t msgsize)
+transmit (struct GNUNET_SERVER_Client *client,
+ struct GNUNET_MessageHeader *msg)
{
struct TransmitCallbackContext *tcc;
}
tcc = GNUNET_malloc (sizeof (struct TransmitCallbackContext));
tcc->msg = msg;
- tcc->msgsize = msgsize;
tcc->client = client;
if (NULL ==
(tcc->th =
- GNUNET_SERVER_notify_transmit_ready (client, msgsize,
+ GNUNET_SERVER_notify_transmit_ready (client,
+ ntohs (msg->size),
GNUNET_TIME_UNIT_FOREVER_REL,
&transmit_callback, tcc)))
{
MarshallPtr (qs->lpBlob, qs, BLOB);
}
+
static void
-process_ip_lookup_result (void* cls, uint32_t rd_count,
- const struct GNUNET_NAMESTORE_RecordData *rd)
+process_ip_lookup_result (void* cls,
+ uint32_t rd_count,
+ const struct GNUNET_NAMESTORE_RecordData *rd)
{
int i, j, csanum;
struct request *rq = (struct request *) cls;
msg = GNUNET_malloc (size);
msg->header.size = htons (size);
msg->header.type = htons (GNUNET_MESSAGE_TYPE_W32RESOLVER_RESPONSE);
- transmit (rq->client, &msg->header, msg->header.size);
+ transmit (rq->client, &msg->header);
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Error in WSAQUERYSETW size calc: expected %lu, got %lu (recalc %lu)\n", size, (unsigned long) ((char *) ptr - (char *) msg), size_recalc);
}
MarshallWSAQUERYSETW (qs, &rq->sc);
- transmit (rq->client, &msg->header, size);
+ transmit (rq->client, &msg->header);
}
static void