Fix e2e session configuration

This commit is contained in:
Suvendhu Hansa 2024-08-23 20:11:06 +05:30
parent 57a8f7e98a
commit 4b84c570b5

View file

@ -0,0 +1,32 @@
--- a/src/core/device_controller.c 2024-08-23 18:22:55.378560809 +0530
+++ b/src/core/device_controller.c 2024-08-23 19:09:07.130278193 +0530
@@ -4282,6 +4282,14 @@
goto exit;
}
+#if defined(E2ESESSION_EXPERIMENTAL_USP_V_1_2)
+ err = ProcessControllerE2ESessionAdded(cont);
+ if (err != USP_ERR_OK)
+ {
+ goto exit;
+ }
+#endif
+
// Exit if unable to get the object instance numbers present in this controller's MTP table
USP_SNPRINTF(path, sizeof(path), "%s.%d.MTP", device_cont_root, cont_instance);
err = DATA_MODEL_GetInstances(path, &iv);
@@ -4323,14 +4331,6 @@
DEVICE_MQTT_UpdateControllerTopics();
#endif
-#if defined(E2ESESSION_EXPERIMENTAL_USP_V_1_2)
- err = ProcessControllerE2ESessionAdded(cont);
- if (err != USP_ERR_OK)
- {
- goto exit;
- }
-#endif
-
// If the code gets here, then we successfully retrieved all data about the controller (even if some of the MTPs were not added)
err = USP_ERR_OK;