summaryrefslogtreecommitdiff
path: root/comsat/cfg.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-11-11 12:41:45 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-11-11 12:41:45 +0000
commit0d5e25206ad589442bc13ad1791bc150e2a597de (patch)
tree529f02a013ee57fa3a2d76b66ca938ee31666317 /comsat/cfg.c
parentdf7db464d035c92a61b12961d2b6bce2f0b7202b (diff)
downloadmailutils-0d5e25206ad589442bc13ad1791bc150e2a597de.tar.gz
mailutils-0d5e25206ad589442bc13ad1791bc150e2a597de.tar.bz2
* auth/sql.c, libproto/mbox/folder.c: Rename MU_READ_ERROR to
MU_ERR_READ, for consistency. * comsat/Makefile.am (comsatd_LDADD): Add all mailbox formats. * comsat/cfg.c: Use mu_error instead of syslog. * comsat/comsat.c (comsat_daemon): Implement test mode. (notify_user): Use mailbox quick access mode instead of directly fiddling with the UNIX mailbox stream. * include/mailutils/stream.h (MU_STREAM_QACCESS): New define. * libproto/mbox/mbox.c: Implement _quick_get_message method. * libproto/mbox/mbox0.h (mbox_scan1): New function. * libproto/mbox/mboxscan.c (mbox_scan0): Split into mbox_scan0 proper and mbox_scan_internal. (mbox_scan1): New function. Remove unused defines. * libsieve/load.c: Do not deallocate loaded modules. * mail.local/main.c (set_debug_flags): Fix typo. * mailbox/amd.c: Implement get_qid method. (amd_append_message) Singal MU_EVT_MESSAGE_APPEND. * mailbox/errors (MU_ERR_BADOP): New error code. (MU_READ_ERROR): Rename to MU_ERR_READ, for consistency. * mailbox/file_stream.c (_prog_destroy,_prog_close): Fix waiting for the children to terminate. Do not forcefully kill them. * mailbox/mailbox.c: Control allowed operations, depending on MU_STREAM_QACCESS bit.
Diffstat (limited to 'comsat/cfg.c')
-rw-r--r--comsat/cfg.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/comsat/cfg.c b/comsat/cfg.c
index a126c4fcd..2f4f38170 100644
--- a/comsat/cfg.c
+++ b/comsat/cfg.c
@@ -110,7 +110,7 @@ netdef_parse (char *str)
netdef = malloc (sizeof *netdef);
if (!netdef)
{
- syslog (LOG_ERR, _("Out of memory"));
+ mu_error (_("Out of memory"));
exit (1);
}
@@ -135,7 +135,8 @@ read_config (const char *config_file)
fp = fopen (config_file, "r");
if (!fp)
{
- syslog (LOG_ERR, _("Cannot open config file %s: %m"), config_file);
+ mu_error (_("Cannot open config file %s: %s"), config_file,
+ mu_strerror (errno));
return;
}
@@ -162,7 +163,7 @@ read_config (const char *config_file)
mu_argcv_get (ptr, "", NULL, &argc, &argv);
if (argc < 2)
{
- syslog (LOG_ERR, _("%s:%d: too few fields"), config_file, line);
+ mu_error (_("%s:%d: too few fields"), config_file, line);
mu_argcv_free (argc, argv);
continue;
}
@@ -174,7 +175,7 @@ read_config (const char *config_file)
else if (strcmp (argv[1], "no") == 0)
allow_biffrc = 0;
else
- syslog (LOG_ERR, _("%s:%d: yes or no expected"), config_file, line);
+ mu_error (_("%s:%d: yes or no expected"), config_file, line);
}
else if (strcmp (argv[0], "max-requests") == 0)
maxrequests = strtoul (argv[1], NULL, 0);
@@ -194,7 +195,7 @@ read_config (const char *config_file)
action = ACT_DENY;
else
{
- syslog (LOG_ERR, _("%s:%d: unknown keyword"), config_file, line);
+ mu_error (_("%s:%d: unknown keyword"), config_file, line);
mu_argcv_free (argc, argv);
continue;
}
@@ -205,8 +206,8 @@ read_config (const char *config_file)
netdef_t *cur = netdef_parse (argv[i]);
if (!cur)
{
- syslog (LOG_ERR, _("%s:%d: cannot parse netdef: %s"),
- config_file, line, argv[i]);
+ mu_error (_("%s:%d: cannot parse netdef: %s"),
+ config_file, line, argv[i]);
continue;
}
if (!tail)
@@ -221,7 +222,7 @@ read_config (const char *config_file)
acl = malloc (sizeof *acl);
if (!acl)
{
- syslog (LOG_CRIT, _("Out of memory"));
+ mu_error (_("Out of memory"));
exit (1);
}
acl->next = NULL;

Return to:

Send suggestions and report system problems to the System administrator.