From 451036aebcceb835b4a6e88309904ef1f5bc34df Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta Date: Thu, 7 Aug 2025 10:23:50 +0530 Subject: [PATCH] obuspa: Integrated v10.0.6 --- obuspa/Makefile | 4 +-- obuspa/patches/1000-suppress-logs.patch | 24 ++++++++-------- .../patches/1001-use-datamodel-caching.patch | 28 +++++++++---------- .../patches/1003-ct-full-access-rename.patch | 8 +++--- .../2001-validate-controller-mtp.patch | 20 ++++++------- obuspa/patches/2002-max_controllers.patch | 12 ++++---- .../2004-mqtt-dualstack-fallback.patch | 22 +++++++-------- .../patches/2005-revert-mqtt-sub-error.patch | 8 +++--- 8 files changed, 63 insertions(+), 63 deletions(-) diff --git a/obuspa/Makefile b/obuspa/Makefile index 70e446fd3..2f549dc01 100644 --- a/obuspa/Makefile +++ b/obuspa/Makefile @@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=obuspa -PKG_VERSION:=10.0.5.0 +PKG_VERSION:=10.0.6.0 LOCAL_DEV:=0 ifneq ($(LOCAL_DEV),1) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git -PKG_SOURCE_VERSION:=ccd245d5405f0032bac234e143be41a21f1edd2a +PKG_SOURCE_VERSION:=027945fb319feeabe013965f6921e338d0c84397 PKG_MAINTAINER:=Vivek Dutta PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_MIRROR_HASH:=skip diff --git a/obuspa/patches/1000-suppress-logs.patch b/obuspa/patches/1000-suppress-logs.patch index 36421d6b4..54f5ad457 100644 --- a/obuspa/patches/1000-suppress-logs.patch +++ b/obuspa/patches/1000-suppress-logs.patch @@ -1,7 +1,7 @@ -Index: obuspa-10.0.5.0/src/core/cli_server.c +Index: obuspa-10.0.6.0/src/core/cli_server.c =================================================================== ---- obuspa-10.0.5.0.orig/src/core/cli_server.c -+++ obuspa-10.0.5.0/src/core/cli_server.c +--- obuspa-10.0.6.0.orig/src/core/cli_server.c ++++ obuspa-10.0.6.0/src/core/cli_server.c @@ -725,10 +725,6 @@ int ExecuteCli_Get(str_vector_t *args) USP_ASSERT(gge->value != NULL); SendCliResponse("%s => %s\n", gge->path, gge->value); @@ -13,11 +13,11 @@ Index: obuspa-10.0.5.0/src/core/cli_server.c } GROUP_GET_VECTOR_Destroy(&ggv); -Index: obuspa-10.0.5.0/src/core/data_model.c +Index: obuspa-10.0.6.0/src/core/data_model.c =================================================================== ---- obuspa-10.0.5.0.orig/src/core/data_model.c -+++ obuspa-10.0.5.0/src/core/data_model.c -@@ -1325,7 +1325,7 @@ int DATA_MODEL_NotifyInstanceAdded(char +--- obuspa-10.0.6.0.orig/src/core/data_model.c ++++ obuspa-10.0.6.0/src/core/data_model.c +@@ -1398,7 +1398,7 @@ int DATA_MODEL_NotifyInstanceAdded(char // Exit if instance already exists - nothing to do if (exists) { @@ -26,7 +26,7 @@ Index: obuspa-10.0.5.0/src/core/data_model.c return USP_ERR_CREATION_FAILURE; } -@@ -1413,7 +1413,7 @@ int DATA_MODEL_NotifyInstanceDeleted(cha +@@ -1486,7 +1486,7 @@ int DATA_MODEL_NotifyInstanceDeleted(cha // Exit if instance does not exist - nothing to do if (exists == false) { @@ -35,11 +35,11 @@ Index: obuspa-10.0.5.0/src/core/data_model.c return USP_ERR_OBJECT_DOES_NOT_EXIST; } -Index: obuspa-10.0.5.0/src/core/mqtt.c +Index: obuspa-10.0.6.0/src/core/mqtt.c =================================================================== ---- obuspa-10.0.5.0.orig/src/core/mqtt.c -+++ obuspa-10.0.5.0/src/core/mqtt.c -@@ -4025,7 +4025,7 @@ void MessageV5Callback(struct mosquitto +--- obuspa-10.0.6.0.orig/src/core/mqtt.c ++++ obuspa-10.0.6.0/src/core/mqtt.c +@@ -4059,7 +4059,7 @@ void MessageV5Callback(struct mosquitto if (mosquitto_property_read_string(props, RESPONSE_TOPIC, &response_info_ptr, false) == NULL) { diff --git a/obuspa/patches/1001-use-datamodel-caching.patch b/obuspa/patches/1001-use-datamodel-caching.patch index d435d378f..e0e211ad3 100644 --- a/obuspa/patches/1001-use-datamodel-caching.patch +++ b/obuspa/patches/1001-use-datamodel-caching.patch @@ -4,10 +4,10 @@ Date: Wed Apr 30 17:18:27 2025 +0530 1001-use-datamodel-caching.patch -Index: obuspa-10.0.5.0/src/core/cli_server.c +Index: obuspa-10.0.6.0/src/core/cli_server.c =================================================================== ---- obuspa-10.0.5.0.orig/src/core/cli_server.c -+++ obuspa-10.0.5.0/src/core/cli_server.c +--- obuspa-10.0.6.0.orig/src/core/cli_server.c ++++ obuspa-10.0.6.0/src/core/cli_server.c @@ -512,6 +512,7 @@ int CLI_SERVER_ExecuteCliCommand(char *c SendCliResponse("WARNING: Discarding unused args: %s\n", args.vector[cli_cmd->max_args+1]); } @@ -28,21 +28,21 @@ Index: obuspa-10.0.5.0/src/core/cli_server.c #ifndef REMOVE_USP_BROKER char *arg1; -Index: obuspa-10.0.5.0/src/core/data_model.h +Index: obuspa-10.0.6.0/src/core/data_model.h =================================================================== ---- obuspa-10.0.5.0.orig/src/core/data_model.h -+++ obuspa-10.0.5.0/src/core/data_model.h -@@ -416,5 +416,6 @@ int DM_PRIV_ReRegister_DBParam_Default(c +--- obuspa-10.0.6.0.orig/src/core/data_model.h ++++ obuspa-10.0.6.0/src/core/data_model.h +@@ -417,5 +417,6 @@ int DM_PRIV_ReRegister_DBParam_Default(c bool DM_PRIV_IsChildNodeOf(dm_node_t *node, dm_node_t *parent_node); void DM_PRIV_GetAllEventsAndCommands(dm_node_t *node, str_vector_t *events, str_vector_t *commands); +int vendor_create_dm_cache(char *paths[], int num_paths); #endif -Index: obuspa-10.0.5.0/src/core/handle_get.c +Index: obuspa-10.0.6.0/src/core/handle_get.c =================================================================== ---- obuspa-10.0.5.0.orig/src/core/handle_get.c -+++ obuspa-10.0.5.0/src/core/handle_get.c +--- obuspa-10.0.6.0.orig/src/core/handle_get.c ++++ obuspa-10.0.6.0/src/core/handle_get.c @@ -129,6 +129,7 @@ void MSG_HANDLER_HandleGet(Usp__Msg *usp goto exit; } @@ -51,11 +51,11 @@ Index: obuspa-10.0.5.0/src/core/handle_get.c // Calculate the number of hierarchical levels to traverse in the data model when performing partial path resolution // NOTE: protocol buffer has depth as an unsigned quantity, but internally we use a signed number, so limit range to that of a signed number depth = usp->body->request->get->max_depth; -Index: obuspa-10.0.5.0/src/core/msg_handler.c +Index: obuspa-10.0.6.0/src/core/msg_handler.c =================================================================== ---- obuspa-10.0.5.0.orig/src/core/msg_handler.c -+++ obuspa-10.0.5.0/src/core/msg_handler.c -@@ -863,6 +863,8 @@ int HandleUspMessage(Usp__Msg *usp, char +--- obuspa-10.0.6.0.orig/src/core/msg_handler.c ++++ obuspa-10.0.6.0/src/core/msg_handler.c +@@ -987,6 +987,8 @@ int HandleUspMessage(Usp__Msg *usp, char MSG_HANDLER_UspMsgTypeToString(usp->header->msg_type), iso8601_cur_time(buf, sizeof(buf)) ); diff --git a/obuspa/patches/1003-ct-full-access-rename.patch b/obuspa/patches/1003-ct-full-access-rename.patch index 650ee402a..c785f9cfb 100644 --- a/obuspa/patches/1003-ct-full-access-rename.patch +++ b/obuspa/patches/1003-ct-full-access-rename.patch @@ -1,8 +1,8 @@ -Index: obuspa-10.0.5.0/src/core/data_model.c +Index: obuspa-10.0.6.0/src/core/data_model.c =================================================================== ---- obuspa-10.0.5.0.orig/src/core/data_model.c -+++ obuspa-10.0.5.0/src/core/data_model.c -@@ -5443,7 +5443,7 @@ int RegisterDefaultControllerTrust(void) +--- obuspa-10.0.6.0.orig/src/core/data_model.c ++++ obuspa-10.0.6.0/src/core/data_model.c +@@ -5516,7 +5516,7 @@ int RegisterDefaultControllerTrust(void) int err = USP_ERR_OK; // Register 'Full Access' role diff --git a/obuspa/patches/2001-validate-controller-mtp.patch b/obuspa/patches/2001-validate-controller-mtp.patch index 2e80d3843..9014bb29e 100644 --- a/obuspa/patches/2001-validate-controller-mtp.patch +++ b/obuspa/patches/2001-validate-controller-mtp.patch @@ -1,7 +1,7 @@ -Index: obuspa-10.0.5.0/src/core/device.h +Index: obuspa-10.0.6.0/src/core/device.h =================================================================== ---- obuspa-10.0.5.0.orig/src/core/device.h -+++ obuspa-10.0.5.0/src/core/device.h +--- obuspa-10.0.6.0.orig/src/core/device.h ++++ obuspa-10.0.6.0/src/core/device.h @@ -355,6 +355,10 @@ void DEVICE_CONTROLLER_SetInheritedRole( int DEVICE_CONTROLLER_CountEnabledWebsockClientConnections(void); #endif @@ -13,10 +13,10 @@ Index: obuspa-10.0.5.0/src/core/device.h #ifndef REMOVE_USP_BROKER int DEVICE_SUBSCRIPTION_RouteNotification(Usp__Msg *usp, int instance, char *subscribed_path); bool DEVICE_SUBSCRIPTION_MarkVendorLayerSubs(int broker_instance, subs_notify_t notify_type, char *path, int group_id); -Index: obuspa-10.0.5.0/src/core/device_controller.c +Index: obuspa-10.0.6.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 +--- obuspa-10.0.6.0.orig/src/core/device_controller.c ++++ obuspa-10.0.6.0/src/core/device_controller.c @@ -969,6 +969,78 @@ int DEVICE_CONTROLLER_QueueBinaryMessage return USP_ERR_OK; } @@ -96,11 +96,11 @@ Index: obuspa-10.0.5.0/src/core/device_controller.c /*********************************************************************//** ** ** DEVICE_CONTROLLER_IsMTPConfigured -Index: obuspa-10.0.5.0/src/core/msg_handler.c +Index: obuspa-10.0.6.0/src/core/msg_handler.c =================================================================== ---- obuspa-10.0.5.0.orig/src/core/msg_handler.c -+++ obuspa-10.0.5.0/src/core/msg_handler.c -@@ -1220,6 +1220,15 @@ int ValidateUspRecord(UspRecord__Record +--- obuspa-10.0.6.0.orig/src/core/msg_handler.c ++++ obuspa-10.0.6.0/src/core/msg_handler.c +@@ -1344,6 +1344,15 @@ int ValidateUspRecord(UspRecord__Record usp_service_instance = USP_BROKER_GetUspServiceInstance(rec->from_id, 0); #endif diff --git a/obuspa/patches/2002-max_controllers.patch b/obuspa/patches/2002-max_controllers.patch index 11f705b55..1f48e2117 100644 --- a/obuspa/patches/2002-max_controllers.patch +++ b/obuspa/patches/2002-max_controllers.patch @@ -1,8 +1,8 @@ -Index: obuspa-10.0.0.1/src/core/mqtt.c +Index: obuspa-10.0.6.0/src/core/mqtt.c =================================================================== ---- obuspa-10.0.0.1.orig/src/core/mqtt.c -+++ obuspa-10.0.0.1/src/core/mqtt.c -@@ -259,6 +259,8 @@ void MqttSubscriptionDestroy(mqtt_subscr +--- obuspa-10.0.6.0.orig/src/core/mqtt.c ++++ obuspa-10.0.6.0/src/core/mqtt.c +@@ -265,6 +265,8 @@ void SaveMqttPublishErrMsg(const char *f #define DEFINE_MQTT_TrustCertVerifyCallbackIndex(index) \ int MQTT_TrustCertVerifyCallback_##index (int preverify_ok, X509_STORE_CTX *x509_ctx) \ {\ @@ -11,7 +11,7 @@ Index: obuspa-10.0.0.1/src/core/mqtt.c return DEVICE_SECURITY_TrustCertVerifyCallbackWithCertChain(preverify_ok, x509_ctx, &mqtt_clients[index].cert_chain);\ } -@@ -269,6 +271,11 @@ DEFINE_MQTT_TrustCertVerifyCallbackIndex +@@ -275,6 +277,11 @@ DEFINE_MQTT_TrustCertVerifyCallbackIndex DEFINE_MQTT_TrustCertVerifyCallbackIndex(2); DEFINE_MQTT_TrustCertVerifyCallbackIndex(3); DEFINE_MQTT_TrustCertVerifyCallbackIndex(4); @@ -23,7 +23,7 @@ Index: obuspa-10.0.0.1/src/core/mqtt.c // Add more, with incrementing indexes here, if you change MAX_MQTT_CLIENTS //------------------------------------------------------------------------------------ -@@ -279,10 +286,15 @@ ssl_verify_callback_t* mqtt_verify_callb +@@ -285,10 +292,15 @@ ssl_verify_callback_t* mqtt_verify_callb MQTT_TrustCertVerifyCallbackIndex(2), MQTT_TrustCertVerifyCallbackIndex(3), MQTT_TrustCertVerifyCallbackIndex(4), diff --git a/obuspa/patches/2004-mqtt-dualstack-fallback.patch b/obuspa/patches/2004-mqtt-dualstack-fallback.patch index 3a56ef013..3ded7f2d1 100644 --- a/obuspa/patches/2004-mqtt-dualstack-fallback.patch +++ b/obuspa/patches/2004-mqtt-dualstack-fallback.patch @@ -1,7 +1,7 @@ -diff --git a/src/core/mqtt.c b/src/core/mqtt.c -index 70978501b1..96119fe080 100644 ---- a/src/core/mqtt.c -+++ b/src/core/mqtt.c +Index: obuspa-10.0.6.0/src/core/mqtt.c +=================================================================== +--- obuspa-10.0.6.0.orig/src/core/mqtt.c ++++ obuspa-10.0.6.0/src/core/mqtt.c @@ -53,6 +53,7 @@ #include #include @@ -10,7 +10,7 @@ index 70978501b1..96119fe080 100644 #include #include "mqtt.h" -@@ -201,8 +202,9 @@ int EnableMosquitto(mqtt_client_t *client); +@@ -206,8 +207,9 @@ int EnableMosquitto(mqtt_client_t *clien void SetupCallbacks(mqtt_client_t *client); void QueueUspConnectRecord_MQTT(mqtt_client_t *client, mtp_send_item_t *msi, char *controller_topic, time_t expiry_time); int SendQueueHead(mqtt_client_t *client); @@ -21,7 +21,7 @@ index 70978501b1..96119fe080 100644 int ConnectSetEncryption(mqtt_client_t *client); void ConnectCallback(struct mosquitto *mosq, void *userdata, int result); void ConnectV5Callback(struct mosquitto *mosq, void *userdata, int result, int flags, const mosquitto_property *props); -@@ -245,7 +247,7 @@ void HandleMqttReconnect(mqtt_client_t *client); +@@ -250,7 +252,7 @@ void HandleMqttReconnect(mqtt_client_t * void HandleMqttReconnectAfterDisconnect(mqtt_client_t *client); void HandleMqttDisconnect(mqtt_client_t *client); void DisconnectIfAllSubscriptionsFailed(mqtt_client_t *client); @@ -30,7 +30,7 @@ index 70978501b1..96119fe080 100644 void RemoveMqttQueueItem(mqtt_client_t *client, mqtt_send_item_t *queued_msg); void RemoveExpiredMqttMessages(mqtt_client_t *client); void ParseSubscribeTopicsFromConnack(mqtt_client_t *client, mosquitto_property *prop); -@@ -2350,6 +2352,143 @@ int SendQueueHead(mqtt_client_t *client) +@@ -2380,6 +2382,143 @@ int SendQueueHead(mqtt_client_t *client) return err; } @@ -174,7 +174,7 @@ index 70978501b1..96119fe080 100644 /*********************************************************************//** ** ** IsMqttBrokerUp -@@ -2364,109 +2503,92 @@ int SendQueueHead(mqtt_client_t *client) +@@ -2394,109 +2533,92 @@ int SendQueueHead(mqtt_client_t *client) ** \return true if the MQTT Broker is up, false otherwise ** **************************************************************************/ @@ -343,7 +343,7 @@ index 70978501b1..96119fe080 100644 } return result; -@@ -2487,18 +2609,20 @@ void Connect(mqtt_client_t *client) +@@ -2517,18 +2639,20 @@ void Connect(mqtt_client_t *client) { int err = USP_ERR_OK; bool is_up; @@ -367,7 +367,7 @@ index 70978501b1..96119fe080 100644 // Exit if failed to connect if (err != USP_ERR_OK) -@@ -2531,7 +2655,7 @@ exit: +@@ -2561,7 +2685,7 @@ exit: ** \return USP_ERR_INTERNAL_ERROR if failed to connect (and should retry) ** **************************************************************************/ @@ -376,7 +376,7 @@ index 70978501b1..96119fe080 100644 { int version; mosquitto_property *proplist = NULL; -@@ -2601,19 +2725,19 @@ int PerformMqttClientConnect(mqtt_client_t *client) +@@ -2631,19 +2755,19 @@ int PerformMqttClientConnect(mqtt_client // We do this to prevent the data model thread from potentially being blocked, whilst the connect call is taking place OS_UTILS_UnlockMutex(&mqtt_access_mutex); diff --git a/obuspa/patches/2005-revert-mqtt-sub-error.patch b/obuspa/patches/2005-revert-mqtt-sub-error.patch index e70dd8e11..8ccc46a9e 100644 --- a/obuspa/patches/2005-revert-mqtt-sub-error.patch +++ b/obuspa/patches/2005-revert-mqtt-sub-error.patch @@ -1,8 +1,8 @@ -Index: obuspa-10.0.5.0/src/core/mqtt.c +Index: obuspa-10.0.6.0/src/core/mqtt.c =================================================================== ---- obuspa-10.0.5.0.orig/src/core/mqtt.c -+++ obuspa-10.0.5.0/src/core/mqtt.c -@@ -3417,8 +3417,8 @@ void SubscribeToAll(mqtt_client_t *clien +--- obuspa-10.0.6.0.orig/src/core/mqtt.c ++++ obuspa-10.0.6.0/src/core/mqtt.c +@@ -3447,8 +3447,8 @@ void SubscribeToAll(mqtt_client_t *clien // Exit if no agent response topic configured (or set by the CONNACK) USP_SNPRINTF(buf, sizeof(buf), "%s: No response topic configured (or set by the CONNACK)", __FUNCTION__); USP_LOG_Error("%s", buf);