determine network scope for ATS even if we do not yet have a session and only have...
[oweals/gnunet.git] / src / transport / plugin_transport_smtp.c
index 828a0b8847e5fb277a91d76536fda4d88101e4e3..811b5254b247afcbcae6250019ae749d5d1a0860 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2003, 2004, 2005, 2006, 2007 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2003-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      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.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 
 /**
@@ -27,7 +27,7 @@
 
 #include "platform.h"
 #include "gnunet_util.h"
-#include "gnunet_directories.h"
+#include "gnunet_constants.h"
 #include "gnunet_protocols.h"
 #include "gnunet_transport.h"
 #include "gnunet_stats_service.h"
@@ -233,7 +233,7 @@ listenAndDistribute (void *unused)
       }
       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;
@@ -541,7 +541,7 @@ api_connect (const GNUNET_MessageHello * hello, GNUNET_TSession ** tsessionPtr,
 {
   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));