always enable error messages when loading protocol files

This commit is contained in:
2018-07-06 17:02:34 +02:00
parent 343eef324b
commit e09506c2bb
2 changed files with 7 additions and 1 deletions

View File

@ -196,8 +196,12 @@ extern "C" long streamReload(char* recordname)
dbCommon* record;
long status;
int oldStreamError = streamError;
streamError = 1;
if(!pdbbase) {
error("No database has been loaded\n");
streamError = oldStreamError;
return ERROR;
}
debug("streamReload(%s)\n", recordname);
@ -234,6 +238,7 @@ extern "C" long streamReload(char* recordname)
}
dbFinishEntry(&dbentry);
StreamProtocolParser::free();
streamError = oldStreamError;
return OK;
}
@ -408,6 +413,7 @@ long streamInit(int after)
{
if (after)
{
streamError = 0; // Switch off errors after init in order not to spam messages when a device is down.
StreamProtocolParser::free();
}
return OK;

View File

@ -23,7 +23,7 @@
#include <stdio.h>
int streamDebug = 0;
int streamError = 0;
int streamError = 1;
extern "C" {
#ifdef _WIN32
__declspec(dllexport)