/*
This file is part of GNUnet
- (C) 2003, 2004, 2005, 2006, 2007 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2003-2013 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ SPDX-License-Identifier: AGPL3.0-or-later
*/
/**
}
if (stats != NULL)
stats->change (stat_bytesReceived, size);
- coreMP = GNUNET_malloc (sizeof (GNUNET_TransportPacket));
+ coreMP = GNUNET_new (GNUNET_TransportPacket);
coreMP->msg = out;
coreMP->size = size - sizeof (SMTPMessage);
coreMP->tsession = NULL;
haddr = (EmailAddress *) &msg[1];
memset (&haddr->filter[0], 0, FILTER_STRING_SIZE);
strcpy (&haddr->filter[0], filter);
- memcpy (&haddr->senderAddress[0], email, strlen (email) + 1);
+ GNUNET_memcpy (&haddr->senderAddress[0], email, strlen (email) + 1);
msg->senderAddressSize = htons (strlen (email) + 1 + sizeof (EmailAddress));
msg->protocol = htons (GNUNET_TRANSPORT_PROTOCOL_NUMBER_SMTP);
msg->MTU = htonl (smtpAPI.mtu);
}
GNUNET_free (filter);
m = GNUNET_malloc (size + sizeof (SMTPMessage));
- memcpy (m, msg, size);
+ GNUNET_memcpy (m, msg, size);
mp = (SMTPMessage *) &m[size];
mp->header.size = htons (size + sizeof (SMTPMessage));
mp->header.type = htons (0);
{
GNUNET_TSession *tsession;
- tsession = GNUNET_malloc (sizeof (GNUNET_TSession));
+ tsession = GNUNET_new (GNUNET_TSession);
tsession->internal = GNUNET_malloc (GNUNET_sizeof_hello (hello));
tsession->peer = hello->senderIdentity;
- memcpy (tsession->internal, hello, GNUNET_sizeof_hello (hello));
+ GNUNET_memcpy (tsession->internal, hello, GNUNET_sizeof_hello (hello));
tsession->ttype = smtpAPI.protocol_number;
(*tsessionPtr) = tsession;
return GNUNET_OK;