hack with coruppted connections

show error message only one
This commit is contained in:
2024-11-14 09:07:06 +01:00
parent 1ab4723261
commit 1f02f21aa7

View File

@ -289,12 +289,16 @@ SConnection *SCCreateDummyConnection(SicsInterp * pSics)
/*--------------------------------------------------------------------------*/
int VerifyConnection(SConnection * self)
{
static SConnection *previous = NULL;
if (!self) {
Log(ERROR,"sys","%s","MAGICERROR: Invalid call to NULL connection");
return 0;
}
if (self->lMagic != CONMAGIC) {
Log(ERROR,"sys","%s","MAGICERROR: corrupted connection object");
if (self != previous) {
previous = self;
Log(ERROR,"sys","%s","MAGICERROR: corrupted connection object");
}
return 0;
}
return 1;