Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [1.4.1](https://github.com/rdkcentral/tr69hostif/compare/1.4.0...1.4.1)

- RDKEMW-15041: Add RFC Handlers for meminsight RFC [`#426`](https://github.com/rdkcentral/tr69hostif/pull/426)
- Merge tag '1.4.0' into develop [`fe37481`](https://github.com/rdkcentral/tr69hostif/commit/fe374814ab61d33d3dcd23581eef526c9f467a3d)

#### [1.4.0](https://github.com/rdkcentral/tr69hostif/compare/1.3.9...1.4.0)

> 3 April 2026

- Added Workflow for the JSON parse logic [`#444`](https://github.com/rdkcentral/tr69hostif/pull/444)
- RDKEMW-10029 : Syncing of Gerrit commits that are required for security components [`#440`](https://github.com/rdkcentral/tr69hostif/pull/440)
- Rebase with Develop [`#439`](https://github.com/rdkcentral/tr69hostif/pull/439)
- tr69hostif 1.4.0 release changelog updates [`1c76955`](https://github.com/rdkcentral/tr69hostif/commit/1c76955b93fa406a3c35e66ffe5b01e41bbfe6ba)
- Merge tag '1.3.9' into develop [`172808d`](https://github.com/rdkcentral/tr69hostif/commit/172808d7d26343a6a7142dae366749e71f846b7c)
- RDKEMW-10029: Remove duplicate RedRecovery parameter [`20db7b3`](https://github.com/rdkcentral/tr69hostif/commit/20db7b3f884dd200b6d67db41d139999d80ab567)

Expand Down
374 changes: 374 additions & 0 deletions docs/architecture/partner-defaults-workflow.md

Large diffs are not rendered by default.

28 changes: 17 additions & 11 deletions src/hostif/parodusClient/pal/libpd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <unistd.h>
#include <math.h>
#include <pthread.h>
#include <atomic>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
Expand Down Expand Up @@ -66,7 +67,7 @@ static long timeValDiff(struct timespec *starttime, struct timespec *finishtime)
libpd_instance_t libparodus_instance = NULL;
char parodus_url[URL_SIZE] = {'\0'};
char client_url[URL_SIZE] = {'\0'};
bool exit_parodus_recv = false;
std::atomic_bool exit_parodus_recv(false);
pthread_cond_t parodus_cond = PTHREAD_COND_INITIALIZER;
pthread_mutex_t parodus_lock = PTHREAD_MUTEX_INITIALIZER;
/*----------------------------------------------------------------------------*/
Expand All @@ -84,8 +85,10 @@ void libpd_set_notifyConfigFile(const char* configFile)

void stop_parodus_recv_wait()
{
exit_parodus_recv = true;
pthread_mutex_lock(&parodus_lock);
exit_parodus_recv.store(true);
pthread_cond_signal(&parodus_cond);
pthread_mutex_unlock(&parodus_lock);
}
/**
* Initialize libpd and Load Data model, Invoke connection to parodus
Expand Down Expand Up @@ -143,7 +146,7 @@ static void parodus_receive_wait()

RDK_LOG(RDK_LOG_DEBUG,LOG_PARODUS_IF,"Entering parodus_receive_wait.. \n");

while (!exit_parodus_recv)
while (!exit_parodus_recv.load())
{
rtn = libparodus_receive (libparodus_instance, &wrp_msg, 2000);
if (rtn == 1)
Expand All @@ -155,16 +158,19 @@ static void parodus_receive_wait()
clock_gettime(CLOCK_MONOTONIC, &currTime);
currTime.tv_sec += 5;
pthread_mutex_lock(&parodus_lock);
int wait_ret = pthread_cond_timedwait(&parodus_cond, &parodus_lock,&currTime);
if(wait_ret == ETIMEDOUT)
if (!exit_parodus_recv.load())
{
RDK_LOG(RDK_LOG_DEBUG,LOG_PARODUS_IF,"parodus_receive_wait(): wait for key acquisition timed out");
}
else if(wait_ret != 0)
{
RDK_LOG(RDK_LOG_ERROR,LOG_PARODUS_IF,"parodus_receive_wait(): pthread_cond_timedwait failed with error %d", wait_ret);
int wait_ret = pthread_cond_timedwait(&parodus_cond, &parodus_lock,&currTime);
if(wait_ret == ETIMEDOUT)
{
RDK_LOG(RDK_LOG_DEBUG,LOG_PARODUS_IF,"parodus_receive_wait(): wait for key acquisition timed out");
}
else if(wait_ret != 0)
{
RDK_LOG(RDK_LOG_ERROR,LOG_PARODUS_IF,"parodus_receive_wait(): pthread_cond_timedwait failed with error %d", wait_ret);
}
}
RDK_LOG(RDK_LOG_INFO,LOG_PARODUS_IF,"[%s:%d] Unlocking mutex... \n", __FUNCTION__, __LINE__);
RDK_LOG(RDK_LOG_INFO,LOG_PARODUS_IF,"[%s:%d] Unlocking mutex... \n", __FUNCTION__, __LINE__);
pthread_mutex_unlock(&parodus_lock);
continue;
}
Expand Down
5 changes: 5 additions & 0 deletions src/hostif/parodusClient/pal/webpa_attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ static WAL_STATUS getParamAttributes(const char *pParameterName, AttrVal ***attr
unsigned int i = 0;
HOSTIF_MsgData_t Param = {0};

if ((pParameterName == NULL) || (attr == NULL) || (TotalParams == NULL))
{
return WAL_ERR_INVALID_PARAM;
}

memset(&Param, '\0', sizeof(HOSTIF_MsgData_t));

// Check if pParameterName is in the list of notification parameters and check if the parameter is one among them
Expand Down
2 changes: 1 addition & 1 deletion src/hostif/profiles/DeviceInfo/Device_DeviceInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3119,7 +3119,7 @@ int hostIf_DeviceInfo::findLocalPortAvailable()
{
struct sockaddr_in address = {0,0,0};
int sockfd = -1, status;
int port = MIN_PORT_RANGE;
uint16_t port = MIN_PORT_RANGE;

while (port <= MAX_PORT_RANGE) {
address.sin_family = AF_INET;
Expand Down
3 changes: 1 addition & 2 deletions src/hostif/profiles/DeviceInfo/XrdkCentralComBSStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ bool createBspCompleteFiles()

void XBSStore::getAuthServicePartnerID()
{
const std::string partnerIdPath = "/opt/www/authService/partnerId3.dat";
const std::string filePath = "/opt/www/authService/partnerId3.dat";

// Initialize inotify
int inotifyFd = inotify_init();
Expand All @@ -129,7 +129,6 @@ void XBSStore::getAuthServicePartnerID()
}

// Extracting the parent directories dynamically
std::string filePath(partnerIdPath);
std::string authServiceDir = getParentDirectory(filePath); // "/opt/www/authService"
std::string wwwDir = getParentDirectory(authServiceDir); // "/opt/www"
std::string parentDir = getParentDirectory(wwwDir); // "/opt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static int getEthernetInterfaceName (unsigned int ethInterfaceNum, char* name)
unsigned int count = 0;
for (struct if_nameindex* ifnp = ifname; ifnp->if_index != 0; ifnp++)
{
if ((strncmp (ifnp->if_name, "eth", 3) == 0) && (++count == ethInterfaceNum))
if ((ifnp->if_name != NULL) && (strncmp (ifnp->if_name, "eth", 3) == 0) && (++count == ethInterfaceNum))
{
rc=strcpy_s (name, BUFF_LENGTH_64,ifnp->if_name);
ERR_CHK(rc);
Expand Down
3 changes: 3 additions & 0 deletions src/hostif/profiles/IP/Device_IP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ char* hostIf_IP::getVirtualInterfaceName (struct if_nameindex *phy_if_list, unsi
char *p, *v;
for (struct ifaddrs *ifa_node = ifa; ifa_node; ifa_node = ifa_node->ifa_next)
{
if ((ifa_node->ifa_name == NULL) || (ifa_node->ifa_addr == NULL))
continue;

if (ifa_node->ifa_addr->sa_family == AF_INET) // virtual interfaces are IPv4-specific, so use IPv4 address family to hunt for them.
{
for (struct if_nameindex *phy_if = phy_if_list; phy_if->if_index != 0; phy_if++)
Expand Down
Loading