iopsys-feed/obuspa/patches/0002-fix_e2e_session_init.patch
2025-07-25 09:09:29 +05:30

34 lines
1.1 KiB
Diff

Index: obuspa-10.0.5.0/src/core/device_controller.c
===================================================================
--- obuspa-10.0.5.0.orig/src/core/device_controller.c
+++ obuspa-10.0.5.0/src/core/device_controller.c
@@ -4223,6 +4223,14 @@ int ProcessControllerAdded(int cont_inst
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);
@@ -4264,14 +4272,6 @@ int ProcessControllerAdded(int cont_inst
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;