- fixed: client control object crashes when orIdent is set to NULL -> now sends empty octet string
This commit is contained in:
parent
3abf055cfc
commit
61534daa99
2 changed files with 7 additions and 1 deletions
|
@ -57,6 +57,8 @@ int main(int argc, char** argv) {
|
|||
|
||||
MmsValue* ctlVal = MmsValue_newBoolean(true);
|
||||
|
||||
ControlObjectClient_setOrigin(control, NULL, 3);
|
||||
|
||||
if (ControlObjectClient_operate(control, ctlVal, 0 /* operate now */)) {
|
||||
printf("simpleIOGenericIO/GGIO1.SPCSO1 operated successfully\n");
|
||||
}
|
||||
|
|
|
@ -422,7 +422,11 @@ ControlObjectClient_setOrigin(ControlObjectClient self, const char* orIdent, int
|
|||
if (self->orIdent != NULL)
|
||||
GLOBAL_FREEMEM(self->orIdent);
|
||||
|
||||
self->orIdent = copyString(orIdent);
|
||||
if (orIdent != NULL)
|
||||
self->orIdent = copyString(orIdent);
|
||||
else
|
||||
self->orIdent = NULL;
|
||||
|
||||
self->orCat = orCat;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue