diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-03-10 01:14:48 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-03-10 01:14:48 +0200 |
commit | a77c100e0b642896348bf030ca178b5e5b6acf48 (patch) | |
tree | 71be1dda6bdc4364f160329d1ac239f1089f914e | |
parent | c0901350b140cc98873e39d00d8e5cec6ff8fb15 (diff) | |
download | mailfromd-a77c100e0b642896348bf030ca178b5e5b6acf48.tar.gz mailfromd-a77c100e0b642896348bf030ca178b5e5b6acf48.tar.bz2 |
More bugfixes
* src/main.c (main): Call mf_server_log_setup only for
mode==MAILFROMD_DAEMON.
(parse_opt): Allocate strings appended to args->trace_modules.
* src/prog.c (instr_xmemstk): Adjust stack before pushing to it.
(dump_catch): Print exception names.
-rw-r--r-- | src/main.c | 5 | ||||
-rw-r--r-- | src/prog.c | 7 |
2 files changed, 6 insertions, 6 deletions
@@ -644,7 +644,7 @@ parse_opt(int key, char *arg, struct argp_state *state) mu_list_set_destroy_item(args->trace_modules, destroy_trace_item); } - mu_list_append(args->trace_modules, arg ? arg: xstrdup("all")); + mu_list_append(args->trace_modules, xstrdup(arg ? arg : "all")); break; case ARGP_KEY_INIT: @@ -1253,10 +1253,9 @@ main(int argc, char **argv) || yy_flex_debug || script_ydebug) exit(EX_OK); - mf_server_log_setup(); - switch (mode) { case MAILFROMD_DAEMON: + mf_server_log_setup(); provide_default_milter_server(); provide_default_callout_server(); break; @@ -865,6 +865,8 @@ instr_xmemstk(eval_environ_t env) long off = (long) get_arg(env, 0); size_t val; + adjust_stack(env, 2); + /* See comment in instr_memstk, above */ push(env, 0); val = env_base(env, frame) + off; @@ -874,7 +876,6 @@ instr_xmemstk(eval_environ_t env) prog_trace(env, "XMEMSTK %lu(%ld)=%lu", (unsigned long) frame, off, (unsigned long) val); - adjust_stack(env, 2); } void @@ -1733,10 +1734,10 @@ dump_catch(prog_counter_t i) size_t count = (size_t) dataseg[toff]; STKVAL *tab = (STKVAL *) (dataseg + toff + 1); printf("%ld (%ld)", (long) prog[i], i + (long) prog[i]); - printf("; Targets: "); + printf("; Targets:"); for (i = 0; i < count * NBMBITS; i++) if (((bitmask_bits_t)tab[BIT_WORD(i)]) & BIT_MASK(i)) - printf(" %lu", (unsigned long) i); + printf(" %s(%lu)", mf_exception_str(i), (unsigned long) i); } void |