obuspa: Integrated v10.0.6

This commit is contained in:
Vivek Kumar Dutta 2025-08-07 10:23:50 +05:30 committed by Vivek Dutta
parent 8d01ace7a6
commit 451036aebc
8 changed files with 63 additions and 63 deletions

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa PKG_NAME:=obuspa
PKG_VERSION:=10.0.5.0 PKG_VERSION:=10.0.6.0
LOCAL_DEV:=0 LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1) ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=ccd245d5405f0032bac234e143be41a21f1edd2a PKG_SOURCE_VERSION:=027945fb319feeabe013965f6921e338d0c84397
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu> PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip PKG_MIRROR_HASH:=skip

View file

@ -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.6.0.orig/src/core/cli_server.c
+++ obuspa-10.0.5.0/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) @@ -725,10 +725,6 @@ int ExecuteCli_Get(str_vector_t *args)
USP_ASSERT(gge->value != NULL); USP_ASSERT(gge->value != NULL);
SendCliResponse("%s => %s\n", gge->path, gge->value); 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); 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.6.0.orig/src/core/data_model.c
+++ obuspa-10.0.5.0/src/core/data_model.c +++ obuspa-10.0.6.0/src/core/data_model.c
@@ -1325,7 +1325,7 @@ int DATA_MODEL_NotifyInstanceAdded(char @@ -1398,7 +1398,7 @@ int DATA_MODEL_NotifyInstanceAdded(char
// Exit if instance already exists - nothing to do // Exit if instance already exists - nothing to do
if (exists) if (exists)
{ {
@ -26,7 +26,7 @@ Index: obuspa-10.0.5.0/src/core/data_model.c
return USP_ERR_CREATION_FAILURE; 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 // Exit if instance does not exist - nothing to do
if (exists == false) 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; 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.6.0.orig/src/core/mqtt.c
+++ obuspa-10.0.5.0/src/core/mqtt.c +++ obuspa-10.0.6.0/src/core/mqtt.c
@@ -4025,7 +4025,7 @@ void MessageV5Callback(struct mosquitto @@ -4059,7 +4059,7 @@ void MessageV5Callback(struct mosquitto
if (mosquitto_property_read_string(props, RESPONSE_TOPIC, if (mosquitto_property_read_string(props, RESPONSE_TOPIC,
&response_info_ptr, false) == NULL) &response_info_ptr, false) == NULL)
{ {

View file

@ -4,10 +4,10 @@ Date: Wed Apr 30 17:18:27 2025 +0530
1001-use-datamodel-caching.patch 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.6.0.orig/src/core/cli_server.c
+++ obuspa-10.0.5.0/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 @@ -512,6 +512,7 @@ int CLI_SERVER_ExecuteCliCommand(char *c
SendCliResponse("WARNING: Discarding unused args: %s\n", args.vector[cli_cmd->max_args+1]); 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 #ifndef REMOVE_USP_BROKER
char *arg1; 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.6.0.orig/src/core/data_model.h
+++ obuspa-10.0.5.0/src/core/data_model.h +++ obuspa-10.0.6.0/src/core/data_model.h
@@ -416,5 +416,6 @@ int DM_PRIV_ReRegister_DBParam_Default(c @@ -417,5 +417,6 @@ int DM_PRIV_ReRegister_DBParam_Default(c
bool DM_PRIV_IsChildNodeOf(dm_node_t *node, dm_node_t *parent_node); 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); 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); +int vendor_create_dm_cache(char *paths[], int num_paths);
#endif #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.6.0.orig/src/core/handle_get.c
+++ obuspa-10.0.5.0/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 @@ -129,6 +129,7 @@ void MSG_HANDLER_HandleGet(Usp__Msg *usp
goto exit; 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 // 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 // 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; 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.6.0.orig/src/core/msg_handler.c
+++ obuspa-10.0.5.0/src/core/msg_handler.c +++ obuspa-10.0.6.0/src/core/msg_handler.c
@@ -863,6 +863,8 @@ int HandleUspMessage(Usp__Msg *usp, char @@ -987,6 +987,8 @@ int HandleUspMessage(Usp__Msg *usp, char
MSG_HANDLER_UspMsgTypeToString(usp->header->msg_type), MSG_HANDLER_UspMsgTypeToString(usp->header->msg_type),
iso8601_cur_time(buf, sizeof(buf)) ); iso8601_cur_time(buf, sizeof(buf)) );

View file

@ -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.6.0.orig/src/core/data_model.c
+++ obuspa-10.0.5.0/src/core/data_model.c +++ obuspa-10.0.6.0/src/core/data_model.c
@@ -5443,7 +5443,7 @@ int RegisterDefaultControllerTrust(void) @@ -5516,7 +5516,7 @@ int RegisterDefaultControllerTrust(void)
int err = USP_ERR_OK; int err = USP_ERR_OK;
// Register 'Full Access' role // Register 'Full Access' role

View file

@ -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.6.0.orig/src/core/device.h
+++ obuspa-10.0.5.0/src/core/device.h +++ obuspa-10.0.6.0/src/core/device.h
@@ -355,6 +355,10 @@ void DEVICE_CONTROLLER_SetInheritedRole( @@ -355,6 +355,10 @@ void DEVICE_CONTROLLER_SetInheritedRole(
int DEVICE_CONTROLLER_CountEnabledWebsockClientConnections(void); int DEVICE_CONTROLLER_CountEnabledWebsockClientConnections(void);
#endif #endif
@ -13,10 +13,10 @@ Index: obuspa-10.0.5.0/src/core/device.h
#ifndef REMOVE_USP_BROKER #ifndef REMOVE_USP_BROKER
int DEVICE_SUBSCRIPTION_RouteNotification(Usp__Msg *usp, int instance, char *subscribed_path); 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); 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.6.0.orig/src/core/device_controller.c
+++ obuspa-10.0.5.0/src/core/device_controller.c +++ obuspa-10.0.6.0/src/core/device_controller.c
@@ -969,6 +969,78 @@ int DEVICE_CONTROLLER_QueueBinaryMessage @@ -969,6 +969,78 @@ int DEVICE_CONTROLLER_QueueBinaryMessage
return USP_ERR_OK; return USP_ERR_OK;
} }
@ -96,11 +96,11 @@ Index: obuspa-10.0.5.0/src/core/device_controller.c
/*********************************************************************//** /*********************************************************************//**
** **
** DEVICE_CONTROLLER_IsMTPConfigured ** 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.6.0.orig/src/core/msg_handler.c
+++ obuspa-10.0.5.0/src/core/msg_handler.c +++ obuspa-10.0.6.0/src/core/msg_handler.c
@@ -1220,6 +1220,15 @@ int ValidateUspRecord(UspRecord__Record @@ -1344,6 +1344,15 @@ int ValidateUspRecord(UspRecord__Record
usp_service_instance = USP_BROKER_GetUspServiceInstance(rec->from_id, 0); usp_service_instance = USP_BROKER_GetUspServiceInstance(rec->from_id, 0);
#endif #endif

View file

@ -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.6.0.orig/src/core/mqtt.c
+++ obuspa-10.0.0.1/src/core/mqtt.c +++ obuspa-10.0.6.0/src/core/mqtt.c
@@ -259,6 +259,8 @@ void MqttSubscriptionDestroy(mqtt_subscr @@ -265,6 +265,8 @@ void SaveMqttPublishErrMsg(const char *f
#define DEFINE_MQTT_TrustCertVerifyCallbackIndex(index) \ #define DEFINE_MQTT_TrustCertVerifyCallbackIndex(index) \
int MQTT_TrustCertVerifyCallback_##index (int preverify_ok, X509_STORE_CTX *x509_ctx) \ 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);\ 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(2);
DEFINE_MQTT_TrustCertVerifyCallbackIndex(3); DEFINE_MQTT_TrustCertVerifyCallbackIndex(3);
DEFINE_MQTT_TrustCertVerifyCallbackIndex(4); 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 // 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(2),
MQTT_TrustCertVerifyCallbackIndex(3), MQTT_TrustCertVerifyCallbackIndex(3),
MQTT_TrustCertVerifyCallbackIndex(4), MQTT_TrustCertVerifyCallbackIndex(4),

View file

@ -1,7 +1,7 @@
diff --git a/src/core/mqtt.c b/src/core/mqtt.c Index: obuspa-10.0.6.0/src/core/mqtt.c
index 70978501b1..96119fe080 100644 ===================================================================
--- a/src/core/mqtt.c --- obuspa-10.0.6.0.orig/src/core/mqtt.c
+++ b/src/core/mqtt.c +++ obuspa-10.0.6.0/src/core/mqtt.c
@@ -53,6 +53,7 @@ @@ -53,6 +53,7 @@
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/err.h> #include <openssl/err.h>
@ -10,7 +10,7 @@ index 70978501b1..96119fe080 100644
#include <mosquitto.h> #include <mosquitto.h>
#include "mqtt.h" #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 SetupCallbacks(mqtt_client_t *client);
void QueueUspConnectRecord_MQTT(mqtt_client_t *client, mtp_send_item_t *msi, char *controller_topic, time_t expiry_time); 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); int SendQueueHead(mqtt_client_t *client);
@ -21,7 +21,7 @@ index 70978501b1..96119fe080 100644
int ConnectSetEncryption(mqtt_client_t *client); int ConnectSetEncryption(mqtt_client_t *client);
void ConnectCallback(struct mosquitto *mosq, void *userdata, int result); void ConnectCallback(struct mosquitto *mosq, void *userdata, int result);
void ConnectV5Callback(struct mosquitto *mosq, void *userdata, int result, int flags, const mosquitto_property *props); 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 HandleMqttReconnectAfterDisconnect(mqtt_client_t *client);
void HandleMqttDisconnect(mqtt_client_t *client); void HandleMqttDisconnect(mqtt_client_t *client);
void DisconnectIfAllSubscriptionsFailed(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 RemoveMqttQueueItem(mqtt_client_t *client, mqtt_send_item_t *queued_msg);
void RemoveExpiredMqttMessages(mqtt_client_t *client); void RemoveExpiredMqttMessages(mqtt_client_t *client);
void ParseSubscribeTopicsFromConnack(mqtt_client_t *client, mosquitto_property *prop); 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; return err;
} }
@ -174,7 +174,7 @@ index 70978501b1..96119fe080 100644
/*********************************************************************//** /*********************************************************************//**
** **
** IsMqttBrokerUp ** 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 ** \return true if the MQTT Broker is up, false otherwise
** **
**************************************************************************/ **************************************************************************/
@ -343,7 +343,7 @@ index 70978501b1..96119fe080 100644
} }
return result; 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; int err = USP_ERR_OK;
bool is_up; bool is_up;
@ -367,7 +367,7 @@ index 70978501b1..96119fe080 100644
// Exit if failed to connect // Exit if failed to connect
if (err != USP_ERR_OK) 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) ** \return USP_ERR_INTERNAL_ERROR if failed to connect (and should retry)
** **
**************************************************************************/ **************************************************************************/
@ -376,7 +376,7 @@ index 70978501b1..96119fe080 100644
{ {
int version; int version;
mosquitto_property *proplist = NULL; 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 // 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); OS_UTILS_UnlockMutex(&mqtt_access_mutex);

View file

@ -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.6.0.orig/src/core/mqtt.c
+++ obuspa-10.0.5.0/src/core/mqtt.c +++ obuspa-10.0.6.0/src/core/mqtt.c
@@ -3417,8 +3417,8 @@ void SubscribeToAll(mqtt_client_t *clien @@ -3447,8 +3447,8 @@ void SubscribeToAll(mqtt_client_t *clien
// Exit if no agent response topic configured (or set by the CONNACK) // 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_SNPRINTF(buf, sizeof(buf), "%s: No response topic configured (or set by the CONNACK)", __FUNCTION__);
USP_LOG_Error("%s", buf); USP_LOG_Error("%s", buf);