Commit 564bb3f0 564bb3f00bf1232d6f7423e71aeadd559c32a6ba by Sergey Poznyakoff

(instr_action): Increase action_count; (sieve_run): Log implicit keep action.

1 parent b5025fea
...@@ -60,6 +60,7 @@ instr_action (sieve_machine_t mach) ...@@ -60,6 +60,7 @@ instr_action (sieve_machine_t mach)
60 sieve_debug (mach, "%4lu: ACTION: %s\n", 60 sieve_debug (mach, "%4lu: ACTION: %s\n",
61 (unsigned long) (mach->pc - 1), 61 (unsigned long) (mach->pc - 1),
62 SIEVE_ARG (mach, 3, string)); 62 SIEVE_ARG (mach, 3, string));
63 mach->action_count++;
63 instr_run (mach); 64 instr_run (mach);
64 } 65 }
65 66
...@@ -250,10 +251,15 @@ sieve_run (sieve_machine_t mach) ...@@ -250,10 +251,15 @@ sieve_run (sieve_machine_t mach)
250 { 251 {
251 if (setjmp (mach->errbuf)) 252 if (setjmp (mach->errbuf))
252 return 1; 253 return 1;
254
255 mach->action_count = 0;
253 256
254 for (mach->pc = 1; mach->prog[mach->pc].handler; ) 257 for (mach->pc = 1; mach->prog[mach->pc].handler; )
255 (*mach->prog[mach->pc++].instr) (mach); 258 (*mach->prog[mach->pc++].instr) (mach);
256 259
260 if (mach->action_count == 0)
261 sieve_log_action (mach, "IMPLICIT KEEP", NULL);
262
257 if (INSTR_DEBUG (mach)) 263 if (INSTR_DEBUG (mach))
258 sieve_debug (mach, "%4lu: STOP\n", mach->pc); 264 sieve_debug (mach, "%4lu: STOP\n", mach->pc);
259 265
......