Changeset 15017


Ignore:
Timestamp:
03/10/13 14:59:23 (12 years ago)
Author:
tbretz
Message:
Changed return codes from EvalOption such that 0 means 'stop, but everything is ok'
Location:
trunk/FACT++
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Main.h

    r14664 r15017  
    155155            ostringstream str;
    156156            str << "Exit triggered by EvalOptions with rc=" << rc;
    157             io_service.Write(now, str.str(), MessageImp::kError);
     157            io_service.Write(now, str.str(), rc==0?MessageImp::kInfo:MessageImp::kError);
    158158            return rc;
    159159        }
  • trunk/FACT++/src/StateMachineDimControl.cc

    r14741 r15017  
    571571
    572572    if (conf.Get<bool>("stop"))
    573         return Dim::SendCommand("DIM_CONTROL/STOP", fUser) + 1;
     573        return !Dim::SendCommand("DIM_CONTROL/STOP", fUser);
    574574
    575575    if (conf.Has("start"))
    576         return Dim::SendCommand("DIM_CONTROL/START", conf.Get<string>("start")+" user='"+fUser+"'") + 1;
     576        return !Dim::SendCommand("DIM_CONTROL/START", conf.Get<string>("start")+" user='"+fUser+"'");
    577577
    578578    if (conf.Has("batch"))
    579         return Dim::SendCommand("DIM_CONTROL/EXECUTE", conf.Get<string>("batch")+" user='"+fUser+"'") + 1;
     579        return !Dim::SendCommand("DIM_CONTROL/EXECUTE", conf.Get<string>("batch")+" user='"+fUser+"'");
    580580
    581581    if (conf.Has("msg"))
    582         return Dim::SendCommand("CHAT/MSG", fUser+": "+conf.Get<string>("msg")) + 1;
     582        return !Dim::SendCommand("CHAT/MSG", fUser+": "+conf.Get<string>("msg"));
    583583
    584584    return -1;
  • trunk/FACT++/www/smartfact/index.php

    r15000 r15017  
    271271}
    272272
    273 if ($rc!=1 && $rc!=2)
     273if ($rc>1)
    274274    return header('HTTP/1.0 500 Execution failed [rc='.$rc."]");
    275275
Note: See TracChangeset for help on using the changeset viewer.