~arges/ubuntu/quantal/rsyslog/fix-lp1059592

« back to all changes in this revision

Viewing changes to runtime/vm.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-05-30 18:40:12 UTC
  • mfrom: (1.3.9 upstream)
  • mto: (36.1.1 oneiric.merge)
  • mto: This revision was merged to the branch mainline in revision 37.
  • Revision ID: james.westby@ubuntu.com-20110530184012-ec03xid2c01hyizp
Tags: 5.8.1-1
* New upstream release.
* Bump Standards-Version to 3.9.2. No further changes.
* Enable and install impstats module. (Closes: #620114)
* Update logcheck rule. (Closes: #616659)
* debian/rsyslog.init: Set correct compat level (5).
* The way rsyslog processes SIGHUP has changed. It no longer does a reload
  of its configuration, but simply closes all open files. To apply a changed
  configuration, rsyslogd needs to be restarted now.
  - Drop "reload" action from debian/rsyslog.init, map "force-reload" to
    "restart". (Closes: #580897)
  - Add "rotate" action to debian/rsyslog.init which sends SIGHUP to
    rsyslogd. Use that in debian/rsyslog.logrotate. (Closes: #626365)
  - Update debian/rsyslog-mysql.postinst and rsyslog-pgsql.postinst to use
    restart instead of reload.
  - Add a NEWS file explaining the changed SIGHUP handling.

Show diffs side-by-side

added added

removed removed

Lines of Context:
288
288
        case VARTYPE_STR:
289
289
                bRes = rsCStrCStrCmp(operand1->val.pStr, operand2->val.pStr);
290
290
                break;
291
 
ENDCMPOP(CMP_EQ)
 
291
ENDCMPOP(CMP_NEQ)
292
292
 
293
293
BEGINCMPOP(CMP_LT) /* remember to change the name also in the END macro! */
294
294
        case VARTYPE_NUMBER:
474
474
        CHKiRet(sysvar.GetVar(pOp->operand.pVar->val.pStr, &pVal));
475
475
        vmstk.Push(pThis->pStk, pVal);
476
476
finalize_it:
 
477
        if(Debug && iRet != RS_RET_OK) {
 
478
                if(iRet == RS_RET_SYSVAR_NOT_FOUND) {
 
479
                        DBGPRINTF("rainerscript: sysvar '%s' not found\n",
 
480
                                  rsCStrGetSzStrNoNULL(pOp->operand.pVar->val.pStr));
 
481
                } else {
 
482
                        DBGPRINTF("rainerscript: error %d trying to obtain sysvar '%s'\n",
 
483
                                  iRet, rsCStrGetSzStrNoNULL(pOp->operand.pVar->val.pStr));
 
484
                }
 
485
        }
477
486
ENDop(PUSHSYSVAR)
478
487
 
479
488
/* The function call operation is only very roughly implemented. While the plumbing
666
675
        ISOBJ_TYPE_assert(pThis, vm);
667
676
        ISOBJ_TYPE_assert(pProg, vmprg);
668
677
 
669
 
#define doOP(OP) case opcode_##OP: CHKiRet(op##OP(pThis, pCurrOp)); break
 
678
#define doOP(OP) case opcode_##OP: DBGPRINTF("rainerscript: opcode %s\n", #OP); \
 
679
                                   CHKiRet(op##OP(pThis, pCurrOp)); break
670
680
        pCurrOp = pProg->vmopRoot; /* TODO: do this via a method! */
671
681
        while(pCurrOp != NULL && pCurrOp->opcode != opcode_END_PROG) {
 
682
                DBGPRINTF("rainerscript: executing step, opcode %d...\n", pCurrOp->opcode);
672
683
                switch(pCurrOp->opcode) {
673
684
                        doOP(OR);
674
685
                        doOP(AND);
695
706
                        doOP(UNARY_MINUS);
696
707
                        doOP(FUNC_CALL);
697
708
                        default:
 
709
                                dbgoprint((obj_t*) pThis, "invalid instruction %d in vmprg\n", pCurrOp->opcode);
698
710
                                ABORT_FINALIZE(RS_RET_INVALID_VMOP);
699
 
                                dbgoprint((obj_t*) pThis, "invalid instruction %d in vmprg\n", pCurrOp->opcode);
700
711
                                break;
701
712
                }
702
713
                /* so far, we have plain sequential execution, so on to next... */
709
720
         */
710
721
 
711
722
finalize_it:
 
723
        DBGPRINTF("rainerscript: script execution terminated with state %d\n", iRet);
712
724
        RETiRet;
713
725
}
714
726