summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comsat/comsat.h2
-rw-r--r--imap4d/imap4d.h11
-rw-r--r--imap4d/util.c2
-rw-r--r--mail.local/mail.local.h1
-rw-r--r--pop3d/extra.c2
-rw-r--r--pop3d/pop3d.h7
6 files changed, 12 insertions, 13 deletions
diff --git a/comsat/comsat.h b/comsat/comsat.h
index 423c42bcd..ab61045e3 100644
--- a/comsat/comsat.h
+++ b/comsat/comsat.h
@@ -56,6 +56,7 @@
#include <mailutils/error.h>
#include <argcv.h>
+#include <mu_argp.h>
#ifndef INADDR_NONE
# define INADDR_NONE -1
@@ -71,6 +72,7 @@ extern time_t overflow_delay_time;
extern int maxlines;
extern const char *username;
extern char hostname[];
+extern struct daemon_param daemon_param;
extern void read_config (const char *config_file);
int acl_match (struct sockaddr_in *sa_in);
diff --git a/imap4d/imap4d.h b/imap4d/imap4d.h
index b74a472c9..0f76f82ef 100644
--- a/imap4d/imap4d.h
+++ b/imap4d/imap4d.h
@@ -82,6 +82,8 @@
#include <mailutils/stream.h>
#include <mailutils/mutil.h>
+#include <mu_argp.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -104,10 +106,6 @@ struct imap4d_command
char *tag;
};
-/* Daemon modes. */
-#define INTERACTIVE 0
-#define DAEMON 1
-
/* Global variables and constants*/
#define STATE_NONE (0)
#define STATE_NONAUTH (1 << 0)
@@ -140,15 +138,14 @@ struct imap4d_command
extern struct imap4d_command imap4d_command_table[];
extern FILE *ofile;
-extern unsigned int timeout;
extern mailbox_t mbox;
extern char *homedir;
extern char *rootdir;
-extern char *maildir;
extern int state;
extern volatile size_t children;
extern int is_virtual;
-
+extern struct daemon_param daemon_param;
+
#ifndef HAVE_STRTOK_R
extern char *strtok_r __P((char *s, const char *delim, char **save_ptr));
#endif
diff --git a/imap4d/util.c b/imap4d/util.c
index 8ffcbedd8..753bf69d1 100644
--- a/imap4d/util.c
+++ b/imap4d/util.c
@@ -386,7 +386,7 @@ imap4d_readline (FILE *fp)
line[0] = '\0'; /* start with a empty string. */
do
{
- alarm (timeout);
+ alarm (daemon_param.timeout);
if (fgets (buffer, sizeof (buffer), fp) == NULL)
{
imap4d_bye (ERR_NO_OFILE); /* Logout. */
diff --git a/mail.local/mail.local.h b/mail.local/mail.local.h
index 3c34118d3..5117a257e 100644
--- a/mail.local/mail.local.h
+++ b/mail.local/mail.local.h
@@ -72,6 +72,7 @@
#include <mailutils/stream.h>
#include <mailutils/mutil.h>
#include <mu_dbm.h>
+#include <mu_argp.h>
#ifdef HAVE_MYSQL
# include "../MySql/MySql.h"
diff --git a/pop3d/extra.c b/pop3d/extra.c
index 0720fbaa5..f6aea58a2 100644
--- a/pop3d/extra.c
+++ b/pop3d/extra.c
@@ -136,7 +136,7 @@ pop3d_readline (FILE *fp)
static char buffer[512];
char *ptr;
- alarm (timeout);
+ alarm (daemon_param.timeout);
ptr = fgets (buffer, sizeof (buffer), fp);
alarm (0);
diff --git a/pop3d/pop3d.h b/pop3d/pop3d.h
index a34a9a76d..ab07b8ad6 100644
--- a/pop3d/pop3d.h
+++ b/pop3d/pop3d.h
@@ -117,6 +117,8 @@
#include <mailutils/error.h>
#include <mailutils/mutil.h>
+#include <mu_argp.h>
+
/* For Berkley DB2 APOP password file */
#ifdef HAVE_DB_H
#include <db.h>
@@ -141,9 +143,6 @@
#define TRANSACTION 1
#define UPDATE 2
-#define INTERACTIVE 0
-#define DAEMON 1
-
#define OK 0
#define ERR_WRONG_STATE 1
#define ERR_BAD_ARGS 2
@@ -171,7 +170,6 @@
#endif /* __P */
extern mailbox_t mbox;
-extern unsigned int timeout;
extern int state;
extern char *username;
extern char *maildir;
@@ -179,6 +177,7 @@ extern FILE *ifile;
extern FILE *ofile;
extern char *md5shared;
extern volatile size_t children;
+extern struct daemon_param daemon_param;
extern int pop3d_abquit __P ((int));
extern int pop3d_apop __P ((const char *));

Return to:

Send suggestions and report system problems to the System administrator.