always enable error messages when loading protocol files
This commit is contained in:
@ -196,8 +196,12 @@ extern "C" long streamReload(char* recordname)
|
|||||||
dbCommon* record;
|
dbCommon* record;
|
||||||
long status;
|
long status;
|
||||||
|
|
||||||
|
int oldStreamError = streamError;
|
||||||
|
streamError = 1;
|
||||||
|
|
||||||
if(!pdbbase) {
|
if(!pdbbase) {
|
||||||
error("No database has been loaded\n");
|
error("No database has been loaded\n");
|
||||||
|
streamError = oldStreamError;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
debug("streamReload(%s)\n", recordname);
|
debug("streamReload(%s)\n", recordname);
|
||||||
@ -234,6 +238,7 @@ extern "C" long streamReload(char* recordname)
|
|||||||
}
|
}
|
||||||
dbFinishEntry(&dbentry);
|
dbFinishEntry(&dbentry);
|
||||||
StreamProtocolParser::free();
|
StreamProtocolParser::free();
|
||||||
|
streamError = oldStreamError;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,6 +413,7 @@ long streamInit(int after)
|
|||||||
{
|
{
|
||||||
if (after)
|
if (after)
|
||||||
{
|
{
|
||||||
|
streamError = 0; // Switch off errors after init in order not to spam messages when a device is down.
|
||||||
StreamProtocolParser::free();
|
StreamProtocolParser::free();
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int streamDebug = 0;
|
int streamDebug = 0;
|
||||||
int streamError = 0;
|
int streamError = 1;
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
__declspec(dllexport)
|
__declspec(dllexport)
|
||||||
|
Reference in New Issue
Block a user