commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. release-2.2-759-g296d0bc


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-759-g296d0bc
Date: Mon, 22 Aug 2016 09:04:00 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=296d0bc958142cafe0e839cd43236c14c8310ee2

The branch, master has been updated
       via  296d0bc958142cafe0e839cd43236c14c8310ee2 (commit)
       via  37388665c74c05f8ff12a77f0acc43e589a9b022 (commit)
      from  843ed59e7385022df2ac3f32d8e15ee6d9f52e6d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 296d0bc958142cafe0e839cd43236c14c8310ee2
Author: Sergey Poznyakoff <address@hidden>
Date:   Mon Aug 22 11:18:54 2016 +0300

    Allow to configure the length of the backlog queue for TCP servers
    
    New statement backlog is provided in the server block.
    
    * include/mailutils/server.h (mu_m_server_cfg_init): Pass
    mu_m_server_t as first argument.
    * libmailutils/server/msrv.c (mu_m_server_cfg_init): Pass
    mu_m_server_t as first argument. Customize available statements
    depending on the type of server (tcp vs udp).
    New statement "backlog" available for tcp servers.
    
    * comsat/comsat.c: Update call to mu_m_server_cfg_init
    * imap4d/imap4d.c: Likewise.
    * pop3d/pop3d.c: Likewise.
    * maidag/maidag.c: Likewise.

commit 37388665c74c05f8ff12a77f0acc43e589a9b022
Author: Sergey Poznyakoff <address@hidden>
Date:   Mon Aug 22 11:18:32 2016 +0300

    Minor fixes
    
    * libmailutils/tests/modtofsaf.c (main): Trivial fix.
    * mail/mail.c: Support "address" capability.
    * mu/shell.c: Trivial fixes

-----------------------------------------------------------------------

Summary of changes:
 comsat/comsat.c                |    3 ++-
 imap4d/imap4d.c                |    2 +-
 include/mailutils/server.h     |    2 +-
 libmailutils/server/msrv.c     |   29 ++++++++++++++++++++++++++++-
 libmailutils/tests/modtofsaf.c |    1 -
 maidag/maidag.c                |    2 +-
 mail/mail.c                    |    1 +
 mu/shell.c                     |    6 +++---
 pop3d/pop3d.c                  |    2 +-
 9 files changed, 38 insertions(+), 10 deletions(-)

diff --git a/comsat/comsat.c b/comsat/comsat.c
index 1d3dc97..48add9a 100644
--- a/comsat/comsat.c
+++ b/comsat/comsat.c
@@ -566,7 +566,6 @@ main (int argc, char **argv)
   mu_argp_init (NULL, NULL);
   comsat_init ();
   mu_acl_cfg_init ();
-  mu_m_server_cfg_init (NULL);
   mu_m_server_create (&server, program_version);
   mu_m_server_set_type (server, MU_IP_UDP);
   mu_m_server_set_conn (server, comsat_connection);
@@ -575,6 +574,8 @@ main (int argc, char **argv)
   mu_m_server_set_max_children (server, 20);
   /* FIXME mu_m_server_set_pidfile (); */
   mu_m_server_set_default_port (server, 512);
+  mu_m_server_cfg_init (server, NULL);
+  
   /* FIXME: timeout is not needed. How to disable it? */
   mu_log_syslog = 1;
   
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 9df8fd1..bf7c8c2 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -942,7 +942,6 @@ main (int argc, char **argv)
   mu_tcpwrapper_cfg_init ();
   manlock_cfg_init ();
   mu_acl_cfg_init ();
-  mu_m_server_cfg_init (imap4d_srv_param);
   
   mu_argp_init (NULL, NULL);
 
@@ -956,6 +955,7 @@ main (int argc, char **argv)
   mu_m_server_set_default_port (server, 143);
   mu_m_server_set_timeout (server, 1800);  /* RFC2060: 30 minutes. */
   mu_m_server_set_strexit (server, mu_strexit);
+  mu_m_server_cfg_init (server, imap4d_srv_param);
   
   mu_alloc_die_hook = imap4d_alloc_die;
 
diff --git a/include/mailutils/server.h b/include/mailutils/server.h
index 1214659..2ee1663 100644
--- a/include/mailutils/server.h
+++ b/include/mailutils/server.h
@@ -142,7 +142,7 @@ void mu_m_server_stop (int code);
 int mu_m_server_check_acl (mu_m_server_t msrv, struct sockaddr *s, int salen);
 
 struct mu_cfg_param;
-void mu_m_server_cfg_init (struct mu_cfg_param *app_param);
+void mu_m_server_cfg_init (mu_m_server_t msrv, struct mu_cfg_param *app_param);
 
 
 #endif
diff --git a/libmailutils/server/msrv.c b/libmailutils/server/msrv.c
index eb7310a..3ef1f78 100644
--- a/libmailutils/server/msrv.c
+++ b/libmailutils/server/msrv.c
@@ -24,6 +24,7 @@
 #endif
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
@@ -932,8 +933,32 @@ static struct mu_cfg_param server_cfg_param[] = {
   { NULL }
 };
 
+static int
+_cb_backlog (void *data, mu_config_value_t *val)
+{
+  mu_ip_server_t *psrv = data;
+  int backlog;
+  
+  if (mu_cfg_assert_value_type (val, MU_CFG_STRING))
+    return 1;
+  if (sscanf (val->v.string, "%d", &backlog) != 1 || backlog <= 0
+      || mu_tcp_server_set_backlog (*psrv, backlog))
+    {
+      mu_error (_("invalid argument"));
+      return 1;
+    }
+  return 0;
+}
+
+static struct mu_cfg_param server_tcp_param[] = {
+  { "backlog", mu_cfg_callback,
+    NULL, mu_offsetof (struct mu_srv_config, tcpsrv), _cb_backlog,
+    N_("Size of the queue of pending connections") },
+  { NULL }
+};
+
 void
-mu_m_server_cfg_init (struct mu_cfg_param *app_param)
+mu_m_server_cfg_init (mu_m_server_t srv, struct mu_cfg_param *app_param)
 {
   struct mu_cfg_section *section;
   if (mu_create_canned_section ("server", &section) == 0)
@@ -941,6 +966,8 @@ mu_m_server_cfg_init (struct mu_cfg_param *app_param)
       section->parser = server_section_parser;
       section->label = N_("ipaddr[:port]");
       mu_cfg_section_add_params (section, server_cfg_param);
+      if (srv->deftype == MU_IP_TCP)
+       mu_cfg_section_add_params (section, server_tcp_param);
       if (app_param)
        mu_cfg_section_add_params (section, app_param);
     }
diff --git a/libmailutils/tests/modtofsaf.c b/libmailutils/tests/modtofsaf.c
index e9f5fef..5a6444e 100644
--- a/libmailutils/tests/modtofsaf.c
+++ b/libmailutils/tests/modtofsaf.c
@@ -51,7 +51,6 @@ main (int argc, char **argv)
          const char *s = mu_file_safety_code_to_name (i);
          printf ("%s\n", s ? s : "UNKNOWN");
        }
-      crit &= ~i;
     }
   return 0;
 }
diff --git a/maidag/maidag.c b/maidag/maidag.c
index 57a3734..0eac0c4 100644
--- a/maidag/maidag.c
+++ b/maidag/maidag.c
@@ -522,7 +522,6 @@ main (int argc, char *argv[])
 
   mu_tcpwrapper_cfg_init ();
   mu_acl_cfg_init ();
-  mu_m_server_cfg_init (NULL);
   maidag_cfg_init ();
   
   /* Parse command line */
@@ -537,6 +536,7 @@ main (int argc, char *argv[])
   mu_m_server_set_mode (server, MODE_INTERACTIVE);
   mu_m_server_set_max_children (server, 20);
   mu_m_server_set_timeout (server, 600);
+  mu_m_server_cfg_init (server, NULL);
 
   mu_log_syslog = -1;
   mu_log_print_severity = 1;
diff --git a/mail/mail.c b/mail/mail.c
index b1efaf2..a3d2901 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -231,6 +231,7 @@ static struct argp argp = {
 static const char *mail_capa[] = {
   "mailutils",
   "common",
+  "address",
   "debug",
   "mailbox",
   "locking",
diff --git a/mu/shell.c b/mu/shell.c
index e070890..30966d9 100644
--- a/mu/shell.c
+++ b/mu/shell.c
@@ -297,11 +297,11 @@ get_history_file_name ()
       
       hname = mu_alloc (sizeof HISTFILE_PREFIX + strlen (rl_readline_name) +
                        sizeof HISTFILE_SUFFIX - 1);
-      strcpy (hname, "~/.mu_");
+      strcpy (hname, HISTFILE_PREFIX);
       strcat (hname, rl_readline_name);
       strcat (hname, HISTFILE_SUFFIX);
       filename = mu_tilde_expansion (hname, MU_HIERARCHY_DELIMITER, NULL);
-      free(hname);
+      free (hname);
     }
   return filename;
 }
@@ -348,7 +348,7 @@ mutool_initialize_readline (const char *name)
 static void
 finish_readline ()
 {
-  write_history (get_history_file_name());
+  write_history (get_history_file_name ());
 }
 
 /* Attempt to complete on the contents of TEXT.  START and END bound the
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index 47b87a3..90f04f9 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.c
@@ -575,7 +575,6 @@ main (int argc, char **argv)
   mu_tcpwrapper_cfg_init ();
   manlock_cfg_init ();
   mu_acl_cfg_init ();
-  mu_m_server_cfg_init (pop3d_srv_param);
   
   mu_argp_init (NULL, NULL);
        
@@ -589,6 +588,7 @@ main (int argc, char **argv)
   mu_m_server_set_default_port (server, 110);
   mu_m_server_set_timeout (server, 600);
   mu_m_server_set_strexit (server, mu_strexit);
+  mu_m_server_cfg_init (server, pop3d_srv_param);
 
   mu_alloc_die_hook = pop3d_alloc_die;
 


hooks/post-receive
-- 
GNU Mailutils



reply via email to

[Prev in Thread] Current Thread [Next in Thread]