Add conditional check for object creation in create_object_process
This commit is contained in:
@@ -838,7 +838,11 @@ bool create_object_process(
|
|||||||
data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
object_instance = create_object(data->object_instance);
|
if (create_object) {
|
||||||
|
object_instance = create_object(data->object_instance);
|
||||||
|
} else {
|
||||||
|
object_instance = data->object_instance;
|
||||||
|
}
|
||||||
if (object_instance == BACNET_MAX_INSTANCE) {
|
if (object_instance == BACNET_MAX_INSTANCE) {
|
||||||
/* The device cannot allocate the space needed
|
/* The device cannot allocate the space needed
|
||||||
for the new object.*/
|
for the new object.*/
|
||||||
|
|||||||
Reference in New Issue
Block a user