From 4b84c570b56c5a4122f25cc0c1f2aa3955f099fb Mon Sep 17 00:00:00 2001 From: Suvendhu Hansa Date: Fri, 23 Aug 2024 20:11:06 +0530 Subject: [PATCH] Fix e2e session configuration --- .../patches/0021-fix_e2e_session_init.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 obuspa/patches/0021-fix_e2e_session_init.patch diff --git a/obuspa/patches/0021-fix_e2e_session_init.patch b/obuspa/patches/0021-fix_e2e_session_init.patch new file mode 100644 index 000000000..0cae72d58 --- /dev/null +++ b/obuspa/patches/0021-fix_e2e_session_init.patch @@ -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; +