This file is part of GNUnet.
Copyright (C) 2009-2014, 2016 GNUnet e.V.
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
+ Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file transport/transport_api_address_to_string.c
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,