GNUNET_TRANSPORT_AddressToStringCallback aluc,
void *aluc_cls)
{
- GNUNET_MQ_hd_var_size (reply,
- GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY,
- struct AddressToStringResultMessage);
struct GNUNET_TRANSPORT_AddressToStringContext *alc
= GNUNET_new (struct GNUNET_TRANSPORT_AddressToStringContext);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_reply_handler (alc),
+ GNUNET_MQ_hd_var_size (reply,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY,
+ struct AddressToStringResultMessage,
+ alc),
GNUNET_MQ_handler_end ()
};
size_t alen;
alen = address->address_length;
slen = strlen (address->transport_name) + 1;
- if ( (alen + slen >= GNUNET_SERVER_MAX_MESSAGE_SIZE
+ if ( (alen + slen >= GNUNET_MAX_MESSAGE_SIZE
- sizeof (struct AddressLookupMessage)) ||
- (alen >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
- (slen >= GNUNET_SERVER_MAX_MESSAGE_SIZE) )
+ (alen >= GNUNET_MAX_MESSAGE_SIZE) ||
+ (slen >= GNUNET_MAX_MESSAGE_SIZE) )
{
GNUNET_break (0);
GNUNET_free (alc);
}
alc->cb = aluc;
alc->cb_cls = aluc_cls;
- alc->mq = GNUNET_CLIENT_connecT (cfg,
+ alc->mq = GNUNET_CLIENT_connect (cfg,
"transport",
handlers,
&mq_error_handler,
msg->addrlen = htons ((uint16_t) alen);
msg->timeout = GNUNET_TIME_relative_hton (timeout);
addrbuf = (char *) &msg[1];
- memcpy (addrbuf,
+ GNUNET_memcpy (addrbuf,
address->address,
alen);
- memcpy (&addrbuf[alen],
+ GNUNET_memcpy (&addrbuf[alen],
address->transport_name,
slen);
GNUNET_MQ_send (alc->mq,