Skip to content

Commit f457bb4

Browse files
authored
Merge branch 'develop' into topic/RDK-60610
2 parents f7a59fb + e1191b8 commit f457bb4

29 files changed

+2470
-1173
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,24 @@ All notable changes to this project will be documented in this file. Dates are d
44

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

7+
#### [1.8.0](https://github.com/rdkcentral/telemetry/compare/1.7.4...1.8.0)
8+
9+
- RDK-60312: Remove fork calls for curl transactions [`#242`](https://github.com/rdkcentral/telemetry/pull/242)
10+
- RDK-60533: L1 unit test cases - protocol/rbusMethod and http [`#241`](https://github.com/rdkcentral/telemetry/pull/241)
11+
- RDKB-63348 : Fix duplicate close calls on file descriptor [`#251`](https://github.com/rdkcentral/telemetry/pull/251)
12+
- RDK-60519: Adding L1 unit test cases - dcautil & ccspinterface [`#240`](https://github.com/rdkcentral/telemetry/pull/240)
13+
- RDK-60519: Adding L1 unit test cases for scheduler [`#238`](https://github.com/rdkcentral/telemetry/pull/238)
14+
- RDK-60304: Adding L1 unit test cases to improve code coverage [`#237`](https://github.com/rdkcentral/telemetry/pull/237)
15+
- RDK-60303: Adding L1 unit test cases to improve code coverage for protocol/http [`#231`](https://github.com/rdkcentral/telemetry/pull/231)
16+
717
#### [1.7.4](https://github.com/rdkcentral/telemetry/compare/1.7.3...1.7.4)
818

19+
> 16 January 2026
20+
921
- DELIA-69767: Replace popen() to prevent FD closures and improve logging [`#225`](https://github.com/rdkcentral/telemetry/pull/225)
1022
- RDK-60072: Adding L1 unit test cases to improve code coverage [`#234`](https://github.com/rdkcentral/telemetry/pull/234)
1123
- RDK-60072: Adding L1 unit test cases to improve code coverage [`#219`](https://github.com/rdkcentral/telemetry/pull/219)
24+
- Changelog updates for 1.7.4 release [`f94578f`](https://github.com/rdkcentral/telemetry/commit/f94578fadfd969e832df3d2f1856c6e59ec1a905)
1225

1326
#### [1.7.3](https://github.com/rdkcentral/telemetry/compare/1.7.2...1.7.3)
1427

source/Makefile.am

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ telemetry2_0_LDFLAGS += -lwebconfig_framework
7070
telemetry2_0_CFLAGS += -DFEATURE_SUPPORT_WEBCONFIG
7171
endif
7272

73+
if IS_LIBRDKCONFIG_ENABLED
74+
telemetry2_0_LDFLAGS += -lrdkconfig
75+
telemetry2_0_CFLAGS += $(LIBRDKCONFIG_FLAG)
76+
endif
77+
78+
if IS_LIBRDKCERTSEL_ENABLED
79+
telemetry2_0_LDFLAGS += -lRdkCertSelector
80+
telemetry2_0_CFLAGS += $(LIBRDKCERTSEL_FLAG)
81+
telemetry2_0_CFLAGS += -DENABLE_RDKB_SUPPORT
82+
endif
83+
7384
if ENABLE_CCSP_SUPPORT
7485
telemetry2_0_LDFLAGS+=-lccsp_common
7586
telemetry2_0_SOURCES += t2ssp/ssp_main.c t2ssp/ssp_action.c t2ssp/ssp_messagebus_interface.c t2ssp/dm_pack_datamodel.c

source/bulkdata/profile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ static void* CollectAndReport(void* data)
568568
if(n == ETIMEDOUT)
569569
{
570570
T2Info("TIMEOUT for maxUploadLatency of profile %s\n", profile->name);
571-
ret = sendReportOverHTTP(httpUrl, jsonReport, NULL);
571+
ret = sendReportOverHTTP(httpUrl, jsonReport);
572572
}
573573
else
574574
{
@@ -605,7 +605,7 @@ static void* CollectAndReport(void* data)
605605
}
606606
else
607607
{
608-
ret = sendReportOverHTTP(httpUrl, jsonReport, NULL);
608+
ret = sendReportOverHTTP(httpUrl, jsonReport);
609609
}
610610
}
611611
else

source/bulkdata/profilexconf.c

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ static pthread_mutex_t plMutex; /* TODO - we can remove plMutex most likely but
4949
static pthread_cond_t reuseThread;
5050
static bool reportThreadExits = false;
5151

52-
static pid_t xconfReportPid;
5352
static bool isAbortTriggered = false ;
5453
static bool isOnDemandReport = false ;
5554

@@ -378,7 +377,7 @@ static void* CollectAndReportXconf(void* data)
378377
else
379378
{
380379
T2Debug("Abort upload is not yet set.\n");
381-
ret = sendReportOverHTTP(profile->t2HTTPDest->URL, jsonReport, &xconfReportPid);
380+
ret = sendReportOverHTTP(profile->t2HTTPDest->URL, jsonReport);
382381
}
383382

384383
#ifdef PERSIST_LOG_MON_REF
@@ -395,7 +394,6 @@ static void* CollectAndReportXconf(void* data)
395394
}
396395
#endif
397396

398-
xconfReportPid = -1 ;
399397
if(ret == T2ERROR_FAILURE)
400398
{
401399
if(profile->cachedReportList != NULL && Vector_Size(profile->cachedReportList) >= MAX_CACHED_REPORTS)
@@ -989,50 +987,3 @@ T2ERROR ProfileXConf_storeMarkerEvent(T2Event *eventInfo)
989987
return T2ERROR_SUCCESS;
990988
}
991989

992-
993-
T2ERROR ProfileXConf_terminateReport()
994-
{
995-
996-
T2ERROR ret = T2ERROR_FAILURE;
997-
998-
pthread_mutex_lock(&plMutex);
999-
1000-
if(!singleProfile)
1001-
{
1002-
T2Error("Xconf profile is not set.\n");
1003-
1004-
pthread_mutex_unlock(&plMutex);
1005-
1006-
return ret;
1007-
}
1008-
1009-
// Check whether any XconfReport is in progress
1010-
if(singleProfile->reportInProgress)
1011-
{
1012-
isAbortTriggered = true;
1013-
// Check if a child pid is still alive
1014-
if((xconfReportPid > 0) && !kill(xconfReportPid, 0))
1015-
{
1016-
T2Info("Report upload in progress, terminating the forked reporting child : %d \n", xconfReportPid);
1017-
if(!kill(xconfReportPid, SIGKILL))
1018-
{
1019-
ret = T2ERROR_SUCCESS;
1020-
}
1021-
}
1022-
else
1023-
{
1024-
T2Info(" Report upload has net yet started, set the abort flag \n");
1025-
ret = T2ERROR_SUCCESS;
1026-
}
1027-
}
1028-
else
1029-
{
1030-
T2Info("No report generation in progress. No further action required for abort.\n");
1031-
}
1032-
1033-
pthread_mutex_unlock(&plMutex);
1034-
1035-
return ret;
1036-
1037-
}
1038-

source/bulkdata/profilexconf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ void ProfileXConf_updateMarkerComponentMap();
8080
void ProfileXConf_notifyTimeout(bool isClearSeekMap, bool isOnDemand);
8181
T2ERROR ProfileXConf_storeMarkerEvent(T2Event *eventInfo);
8282
char* ProfileXconf_getName();
83-
T2ERROR ProfileXConf_terminateReport();
8483

8584
T2ERROR ReportProfiles_setProfileXConf(ProfileXConf *profile);
8685

source/bulkdata/reportprofiles.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ static void* reportOnDemand(void *input)
433433
}
434434
else if(!strncmp(action, ON_DEMAND_ACTION_ABORT, MAX_PROFILENAMES_LENGTH))
435435
{
436-
T2Info("Abort report on demand \n");
437-
ProfileXConf_terminateReport();
436+
T2Info("Abort report on demand\n");
437+
T2Info("Abort of the on-demand report is no longer supported; fork-based report execution and termination have been removed\n");
438438
}
439439
else
440440
{
@@ -704,11 +704,6 @@ T2ERROR ReportProfiles_uninit( )
704704
{
705705
getMarkerCompRbusSub(false); // remove Rbus subscription
706706
}
707-
#ifdef LIBRDKCERTSEL_BUILD
708-
curlCertSelectorFree();
709-
#else
710-
uninitMtls();
711-
#endif
712707
T2ER_Uninit();
713708
destroyT2MarkerComponentMap();
714709
uninitScheduler();

source/dcautil/dca.c

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ static bool firstreport_after_bootup = false; // the rotated logs check should r
6767
// Define a struct to hold the file descriptor and size
6868
typedef struct
6969
{
70-
int fd;
7170
off_t cf_map_size;
7271
off_t rf_map_size;
7372
off_t cf_file_size;
@@ -966,11 +965,6 @@ static void freeFileDescriptor(FileDescriptor* fileDescriptor)
966965
}
967966
fileDescriptor->cfaddr = NULL;
968967
fileDescriptor->rfaddr = NULL;
969-
if(fileDescriptor->fd != -1)
970-
{
971-
close(fileDescriptor->fd);
972-
fileDescriptor->fd = -1;
973-
}
974968
free(fileDescriptor);
975969
}
976970
}
@@ -1119,7 +1113,6 @@ static FileDescriptor* getFileDeltaInMemMapAndSearch(const int fd, const off_t s
11191113

11201114
T2Debug("Log file got rotated. Ignoring invalid mapping\n");
11211115
close(tmp_fd);
1122-
close(fd);
11231116
if(rd != -1)
11241117
{
11251118
close(rd);
@@ -1147,13 +1140,11 @@ static FileDescriptor* getFileDeltaInMemMapAndSearch(const int fd, const off_t s
11471140
{
11481141
T2Debug("Log file got rotated. Ignoring invalid mapping\n");
11491142
close(tmp_fd);
1150-
close(fd);
11511143
return NULL;
11521144
}
11531145
addrrf = NULL;
11541146
}
11551147
close(tmp_fd);
1156-
close(fd);
11571148

11581149
if (addrcf == MAP_FAILED)
11591150
{
@@ -1196,7 +1187,6 @@ static FileDescriptor* getFileDeltaInMemMapAndSearch(const int fd, const off_t s
11961187
fileDescriptor->rfaddr = NULL;
11971188
}
11981189
fileDescriptor->cfaddr = addrcf;
1199-
fileDescriptor->fd = fd;
12001190
fileDescriptor->cf_map_size = main_fsize;
12011191
fileDescriptor->cf_file_size = sb.st_size;
12021192
if(fileDescriptor->rfaddr != NULL)
@@ -1283,12 +1273,6 @@ static int parseMarkerListOptimized(GrepSeekProfile *gsProfile, Vector * ip_vMar
12831273
prevfile = NULL;
12841274
}
12851275

1286-
if (fd != -1)
1287-
{
1288-
close(fd);
1289-
fd = -1;
1290-
}
1291-
12921276
if (fileDescriptor != NULL)
12931277
{
12941278
freeFileDescriptor(fileDescriptor);
@@ -1306,14 +1290,16 @@ static int parseMarkerListOptimized(GrepSeekProfile *gsProfile, Vector * ip_vMar
13061290
}
13071291

13081292
fileDescriptor = getFileDeltaInMemMapAndSearch(fd, seek_value, logPath, log_file_for_this_iteration, check_rotated_logs);
1293+
1294+
if (fd != -1)
1295+
{
1296+
close(fd);
1297+
fd = -1;
1298+
}
1299+
13091300
if (fileDescriptor == NULL)
13101301
{
13111302
T2Error("Failed to get file descriptor for %s\n", log_file_for_this_iteration);
1312-
if (fd != -1)
1313-
{
1314-
close(fd);
1315-
fd = -1;
1316-
}
13171303
continue;
13181304
}
13191305
}
@@ -1338,12 +1324,6 @@ static int parseMarkerListOptimized(GrepSeekProfile *gsProfile, Vector * ip_vMar
13381324
prevfile = NULL;
13391325
}
13401326

1341-
if (fd != -1)
1342-
{
1343-
close(fd);
1344-
fd = -1;
1345-
}
1346-
13471327
if (fileDescriptor != NULL)
13481328
{
13491329
freeFileDescriptor(fileDescriptor);

source/protocol/http/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ AM_CFLAGS =
2020

2121
lib_LTLIBRARIES = libhttp.la
2222

23-
libhttp_la_SOURCES = curlinterface.c
23+
libhttp_la_SOURCES = curlinterface.c multicurlinterface.c
2424
libhttp_la_LDFLAGS = -shared -fPIC -lcurl
2525
if IS_LIBRDKCERTSEL_ENABLED
2626
libhttp_la_CFLAGS = $(LIBRDKCERTSEL_FLAG)

0 commit comments

Comments
 (0)