diff --git a/WatchdogCore.cpp b/WatchdogCore.cpp index 2757ed5..1368a9b 100644 --- a/WatchdogCore.cpp +++ b/WatchdogCore.cpp @@ -20,16 +20,16 @@ // Global vars extern char * ProcessName; -char LogStr[1000]; // Temporary var to create log messages, globally available to save on memory operations //--------------------------------------------------------------------------- CWatchdogCore::CWatchdogCore( const char * WatchdogName, const int pInterval, CLogCore * pLog, EDebugLevel pDebugLevel ) : - CFunctionCore( Name, pLog, pDebugLevel, OUT_NORMAL ) + CFunctionCore( WatchdogName, pLog, pDebugLevel, OUT_NORMAL ) { // Create protocol Protocol = new CLiteProtocol( 50, '\x01', '\x02', '\x00' ); - Protocol->AppendParam( Name, strlen(Name) ); + Protocol->NewCommandStr(); + Protocol->AppendParam( WatchdogName, strlen(WatchdogName) ); Protocol->AppendParam( ProcessName, strlen(ProcessName) ); Protocol->AppendParam( "ping", 4 );