This file is part of GNUnet.
Copyright (C) 2010-2015 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.
+ 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/>.
- 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.
+ SPDX-License-Identifier: AGPL3.0-or-later
*/
/**
* @file ats/ats_api_scheduling.c
as we communicate asynchronously with the ATS service. */
return NULL;
}
- if (0 != memcmp (peer,
- &ar->address->peer,
- sizeof (struct GNUNET_PeerIdentity)))
+ if (0 != GNUNET_memcmp (peer,
+ &ar->address->peer))
{
GNUNET_break (0);
return NULL;
(GNUNET_NO == sh->session_array[i]->in_destroy) &&
( (session == sh->session_array[i]->session) ||
(NULL == sh->session_array[i]->session) ) &&
- (0 == memcmp (&address->peer,
- &sh->session_array[i]->address->peer,
- sizeof (struct GNUNET_PeerIdentity))) &&
+ (0 == GNUNET_memcmp (&address->peer,
+ &sh->session_array[i]->address->peer)) &&
(0 == GNUNET_HELLO_address_cmp (address,
sh->session_array[i]->address)) )
return i;
if (NULL == sh->mq)
return; /* disconnected, skip for now */
- GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != ar->properties.scope);
+ GNUNET_break (GNUNET_NT_UNSPECIFIED != ar->properties.scope);
namelen = strlen (ar->address->transport_name) + 1;
msize = ar->address->address_length + namelen;
ev = GNUNET_MQ_msg_extra (m, msize, GNUNET_MESSAGE_TYPE_ATS_ADDRESS_ADD);
GNUNET_break (0);
return NULL;
}
- GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
+ GNUNET_break (GNUNET_NT_UNSPECIFIED != prop->scope);
namelen = strlen (address->transport_name) + 1;
msize = address->address_length + namelen;
- if ((msize + sizeof (struct AddressUpdateMessage) >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
- (address->address_length >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
- (namelen >= GNUNET_SERVER_MAX_MESSAGE_SIZE) )
+ if ((msize + sizeof (struct AddressUpdateMessage) >= GNUNET_MAX_MESSAGE_SIZE) ||
+ (address->address_length >= GNUNET_MAX_MESSAGE_SIZE) ||
+ (namelen >= GNUNET_MAX_MESSAGE_SIZE) )
{
/* address too large for us, this should not happen */
GNUNET_break (0);
ar->address->transport_name,
ar->session,
ar->slot);
- GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
+ GNUNET_break (GNUNET_NT_UNSPECIFIED != prop->scope);
GNUNET_ATS_properties_hton (&ar->properties,
prop);
if (NULL == sh->mq)