Added object list init into create function in cases where create is called before init. (#1122)

This commit is contained in:
Steve Karg
2025-10-29 08:44:31 -05:00
committed by GitHub
parent cf79515272
commit f278ccf37d
26 changed files with 76 additions and 0 deletions
+1
View File
@@ -132,6 +132,7 @@ The git repositories are hosted at the following sites:
### Fixed
* Fixed object creation failure when create is called before init. (#1122)
* Fixed octetstring_copy_value() and added unit tests. (#1121)
* Fixed the MS/TP compare DER function which can now include the NPDU network
priority in the comparison. (#1119)
+3
View File
@@ -1700,6 +1700,9 @@ uint32_t Analog_Input_Create(uint32_t object_instance)
unsigned j;
#endif
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1301,6 +1301,9 @@ uint32_t Analog_Output_Create(uint32_t object_instance)
int index = 0;
unsigned priority = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1421,6 +1421,9 @@ uint32_t Audit_Log_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1770,6 +1770,9 @@ uint32_t Analog_Value_Create(uint32_t object_instance)
unsigned j;
#endif
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1191,6 +1191,9 @@ uint32_t bacfile_create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1327,6 +1327,9 @@ uint32_t Binary_Input_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
@@ -831,6 +831,9 @@ uint32_t BitString_Value_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1561,6 +1561,9 @@ uint32_t Binary_Lighting_Output_Create(uint32_t object_instance)
int index = 0;
unsigned p = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1285,6 +1285,9 @@ uint32_t Binary_Output_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1230,6 +1230,9 @@ uint32_t Binary_Value_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -710,6 +710,9 @@ uint32_t Calendar_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1423,6 +1423,9 @@ uint32_t Channel_Create(uint32_t object_instance)
int index = 0;
unsigned m, g;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1175,6 +1175,9 @@ uint32_t Color_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
@@ -1618,6 +1618,9 @@ uint32_t Color_Temperature_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -120,6 +120,9 @@ uint32_t CharacterString_Value_Create(uint32_t object_instance)
struct characterstring_object *pObject = NULL;
int index;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -761,6 +761,9 @@ uint32_t Integer_Value_Create(uint32_t object_instance)
{
struct integer_object *pObject = NULL;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1713,6 +1713,9 @@ uint32_t Load_Control_Create(uint32_t object_instance)
struct shed_level_data *entry;
unsigned i = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -3421,6 +3421,9 @@ uint32_t Lighting_Output_Create(uint32_t object_instance)
int index = 0;
unsigned p = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -710,6 +710,9 @@ uint32_t Life_Safety_Point_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -887,6 +887,9 @@ uint32_t Life_Safety_Zone_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -994,6 +994,9 @@ uint32_t Multistate_Input_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -1289,6 +1289,9 @@ uint32_t Multistate_Output_Create(uint32_t object_instance)
int index = 0;
unsigned priority = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -996,6 +996,9 @@ uint32_t Multistate_Value_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
@@ -820,6 +820,9 @@ uint32_t Structured_View_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
+3
View File
@@ -806,6 +806,9 @@ uint32_t Time_Value_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (!Object_List) {
Object_List = Keylist_Create();
}
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {