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) int VerifyConnection(SConnection * self)
{ {
static SConnection *previous = NULL;
if (!self) { if (!self) {
Log(ERROR,"sys","%s","MAGICERROR: Invalid call to NULL connection"); Log(ERROR,"sys","%s","MAGICERROR: Invalid call to NULL connection");
return 0; return 0;
} }
if (self->lMagic != CONMAGIC) { if (self->lMagic != CONMAGIC) {
if (self != previous) {
previous = self;
Log(ERROR,"sys","%s","MAGICERROR: corrupted connection object"); Log(ERROR,"sys","%s","MAGICERROR: corrupted connection object");
}
return 0; return 0;
} }
return 1; return 1;