new operation queue for limiting overlay connects
[oweals/gnunet.git] / src / transport / plugin_transport_smtp.c
index 1b9f5fb7271ab128a4b6695201334ce61583951c..c305578e0e8dba38e5dc90ed1650596ee4f8d047 100644 (file)
@@ -40,7 +40,7 @@
  */
 #define SMTP_MESSAGE_SIZE 65528
 
-#define DEBUG_SMTP GNUNET_NO
+#define DEBUG_SMTP GNUNET_EXTRA_LOGGING
 
 #define FILTER_STRING_SIZE 64
 
@@ -72,6 +72,8 @@ typedef struct
 
 } EmailAddress;
 
+GNUNET_NETWORK_STRUCT_BEGIN
+
 /**
  * Encapsulation of a GNUnet message in the SMTP mail body (before
  * base64 encoding).
@@ -86,6 +88,7 @@ typedef struct
   GNUNET_PeerIdentity sender;
 
 } SMTPMessage;
+GNUNET_NETWORK_STRUCT_END
 
 /* *********** globals ************* */
 
@@ -420,9 +423,8 @@ api_verify_hello (const GNUNET_MessageHello * hello)
   maddr = (const EmailAddress *) &hello[1];
   if ((ntohs (hello->header.size) !=
        sizeof (GNUNET_MessageHello) + ntohs (hello->senderAddressSize)) ||
-      (maddr->
-       senderAddress[ntohs (hello->senderAddressSize) - 1 -
-                     FILTER_STRING_SIZE] != '\0'))
+      (maddr->senderAddress
+       [ntohs (hello->senderAddressSize) - 1 - FILTER_STRING_SIZE] != '\0'))
   {
     GNUNET_GE_BREAK (ectx, 0);
     return GNUNET_SYSERR;       /* obviously invalid */
@@ -772,7 +774,7 @@ api_associate (GNUNET_TSession * tsession)
  * frequency limits to SMTP in the future!).
  */
 static int
-api_test_would_try (GNUNET_TSession * tsession, const unsigned int size,
+api_test_would_try (GNUNET_TSession * tsession, unsigned int size,
                     int important)
 {
   return GNUNET_OK;             /* we always try... */
@@ -783,10 +785,8 @@ api_test_would_try (GNUNET_TSession * tsession, const unsigned int size,
  * returns the smtp transport API.
  */
 GNUNET_TransportAPI *
-inittransport_smtp (GNUNET_CoreAPIForTransport * core)
+inittransport_smtp (struct GNUNET_CoreAPIForTransport * core)
 {
-
-
   unsigned long long mtu;
   struct sigaction sa;
 
@@ -813,9 +813,7 @@ inittransport_smtp (GNUNET_CoreAPIForTransport * core)
     stat_bytesDropped =
         stats->create (gettext_noop ("# bytes dropped by SMTP (outgoing)"));
   }
-  GNUNET_GC_get_configuration_value_filename (coreAPI->cfg, "SMTP", "PIPE",
-                                              GNUNET_DEFAULT_DAEMON_VAR_DIRECTORY
-                                              "/smtp-pipe", &pipename);
+  GNUNET_GC_get_configuration_value_filename (coreAPI->cfg, "SMTP", "PIPE", &pipename);
   UNLINK (pipename);
   if (0 != mkfifo (pipename, S_IWUSR | S_IRUSR | S_IWGRP | S_IWOTH))
   {