summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@gnu.org>2018-11-09 12:38:44 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-11-09 12:40:49 (GMT)
commit67eb1f4c05ec5fafec7ec7745575a8213734f134 (patch) (side-by-side diff)
tree68a490c2d2dae0f9d079fc81a10c203fc01cc5ef /src
parent08204cb140768a2963a90c6a20ddb9c6da95695f (diff)
downloadmailfromd-67eb1f4c05ec5fafec7ec7745575a8213734f134.tar.gz
mailfromd-67eb1f4c05ec5fafec7ec7745575a8213734f134.tar.bz2
Document debug categories. Fix improper use of decimal constants instead of MU_DEBUG_TRACE identifiers
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/builtin/io.bi16
-rw-r--r--src/builtin/mbox.bi2
-rw-r--r--src/builtin/other.bi2
-rw-r--r--src/builtin/sa.bi2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/builtin/io.bi b/src/builtin/io.bi
index d1512ad..3e84bb5 100644
--- a/src/builtin/io.bi
+++ b/src/builtin/io.bi
@@ -177,7 +177,7 @@ stderr_to_log(char *arg, const char *cmd)
mu_syslog_priority_to_string(pri));
}
}
- MF_DEBUG(10,
+ MF_DEBUG(MU_DEBUG_TRACE2,
("redirecting stderr to syslog %s.%s",
mu_syslog_facility_to_string(fac),
mu_syslog_priority_to_string(pri)));
@@ -231,7 +231,7 @@ stderr_handler(int mode, char *arg, const char *cmd)
close(2);
break;
}
- MF_DEBUG(10, ("redirecting stderr to %s", arg));
+ MF_DEBUG(MU_DEBUG_TRACE2, ("redirecting stderr to %s", arg));
fd = open(arg, O_CREAT|O_WRONLY|append, 0644);
if (fd < 0) {
mu_error(_("cannot open file %s for appending: %s"),
@@ -361,7 +361,7 @@ open_program_stream_ioe(eval_environ_t env,
/* Close unneded descripitors */
close_fds_above(2);
- MF_DEBUG(10, ("running %s", cmdline));
+ MF_DEBUG(MU_DEBUG_TRACE3, ("running %s", cmdline));
if (mu_wordsplit(cmdline, &ws,
MU_WRDSF_DEFFLAGS & ~MU_WRDSF_CESCAPES)) {
mu_error(_("cannot parse command line %s: %s"),
@@ -716,7 +716,7 @@ MF_DEFUN(open, NUMBER, STRING name)
mfe_failure,
_("no more files available"));
- MF_DEBUG(10, ("opening stream %s", name));
+ MF_DEBUG(MU_DEBUG_TRACE1, ("opening stream %s", name));
iotab[i].name = mu_strdup(name);
iotab[i].delim = NULL;
if (*name == '>') {
@@ -754,7 +754,7 @@ MF_DEFUN(open, NUMBER, STRING name)
mfe_failure,
_("cannot open stream %s: %s"), name,
mu_strerror(rc));
- MF_DEBUG(10, ("open(%s) = %d", name, i));
+ MF_DEBUG(MU_DEBUG_TRACE1, ("open(%s) = %d", name, i));
MF_RETURN(i);
}
END
@@ -775,7 +775,7 @@ MF_DEFUN(spawn, NUMBER, STRING name, OPTIONAL,
mfe_failure,
_("no more files available"));
- MF_DEBUG(10, ("spawning %s", name));
+ MF_DEBUG(MU_DEBUG_TRACE1, ("spawning %s", name));
iotab[i].name = mu_strdup(name);
iotab[i].delim = NULL;
@@ -812,7 +812,7 @@ MF_DEFUN(spawn, NUMBER, STRING name, OPTIONAL,
mfe_failure,
_("cannot open stream %s: %s"), name,
mu_strerror(rc));
- MF_DEBUG(10, ("spawn(%s) = %d", name, i));
+ MF_DEBUG(MU_DEBUG_TRACE1, ("spawn(%s) = %d", name, i));
MF_RETURN(i);
}
@@ -922,7 +922,7 @@ MF_DEFUN(write, VOID, NUMBER fd, STRING str, OPTIONAL, NUMBER n)
struct io_stream *iotab = MF_GET_DATA;
int rc;
- MF_DEBUG(10, ("writing %s to %lu", str, fd));
+ MF_DEBUG(MU_DEBUG_TRACE1, ("writing %s to %lu", str, fd));
MF_ASSERT(fd >= 0 && fd < nstreams && OFD(iotab[fd]) != -1,
mfe_range,
_("invalid file descriptor"));
diff --git a/src/builtin/mbox.bi b/src/builtin/mbox.bi
index df4f3ec..27f7462 100644
--- a/src/builtin/mbox.bi
+++ b/src/builtin/mbox.bi
@@ -89,7 +89,7 @@ MF_DEFUN(mailbox_open, NUMBER, STRING url, OPTIONAL, STRING mode, STRING perms)
MF_ASSERT(md >= 0,
mfe_failure,
_("no more mailboxes available"));
- MF_DEBUG(10, ("opening mailbox %s", url));
+ MF_DEBUG(MU_DEBUG_TRACE1, ("opening mailbox %s", url));
mp = mbtab + md;
flags = 0;
diff --git a/src/builtin/other.bi b/src/builtin/other.bi
index 5063885..bdb21b0 100644
--- a/src/builtin/other.bi
+++ b/src/builtin/other.bi
@@ -48,7 +48,7 @@ valid_user_p(eval_environ_t env, const char *name)
break;
}
- MF_DEBUG(10,
+ MF_DEBUG(MU_DEBUG_TRACE1,
("Checking user %s: %s", name, rc ? "true" : "false"));
return rc;
}
diff --git a/src/builtin/sa.bi b/src/builtin/sa.bi
index fd3fa0b..6225829 100644
--- a/src/builtin/sa.bi
+++ b/src/builtin/sa.bi
@@ -574,7 +574,7 @@ MF_DEFUN(clamav, NUMBER, NUMBER nmsg, STRING urlstr)
s++;
MF_VAR_SET_STRING(clamav_virus_name, s);
- MF_DEBUG(2,
+ MF_DEBUG(MU_DEBUG_TRACE1,
("%sclamav found %s",
mailfromd_msgid(env_get_context(env)), s));
rc = 1;

Return to:

Send suggestions and report system problems to the System administrator.