Skip to content

Commit a156160

Browse files
Ananth916shibu-kv
andauthored
RDKB-62050 : Telemetry report upload failed while using Red Recovery (#191)
* RDKB-62050: Build control flag for Red Recovery feature Default build time disabled. --------- Co-authored-by: Shibu Kakkoth Vayalambron <shibu.kakkoth@gmail.com>
1 parent ca9dba7 commit a156160

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

source/protocol/http/curlinterface.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,12 @@ static T2ERROR setPayload(CURL *curl, const char* payload, childResponse *childC
250250
return T2ERROR_SUCCESS;
251251
}
252252
#ifdef LIBRDKCERTSEL_BUILD
253+
#if defined(ENABLE_RED_RECOVERY_SUPPORT)
253254
bool isStateRedEnabled(void)
254255
{
255256
return access("/tmp/stateRedEnabled", F_OK) == 0;
256257
}
258+
#endif
257259
void curlCertSelectorFree()
258260
{
259261
rdkcertselector_free(&curlCertSelector);
@@ -269,7 +271,10 @@ void curlCertSelectorFree()
269271
}
270272
static void curlCertSelectorInit()
271273
{
272-
bool state_red_enable = isStateRedEnabled();
274+
bool state_red_enable = false;
275+
#if defined(ENABLE_RED_RECOVERY_SUPPORT)
276+
state_red_enable = isStateRedEnabled();
277+
#endif
273278
if (state_red_enable && curlRcvryCertSelector == NULL )
274279
{
275280
curlRcvryCertSelector = rdkcertselector_new( NULL, NULL, "RCVRY" );
@@ -338,9 +343,10 @@ T2ERROR sendReportOverHTTP(char *httpUrl, char *payload, pid_t* outForkedPid)
338343
}
339344
#ifdef LIBRDKCERTSEL_BUILD
340345
curlCertSelectorInit();
346+
#if defined(ENABLE_RED_RECOVERY_SUPPORT)
341347
state_red_enable = isStateRedEnabled();
342348
T2Info("%s: state_red_enable: %d\n", __func__, state_red_enable );
343-
349+
#endif
344350
if (state_red_enable)
345351
{
346352
thisCertSel = curlRcvryCertSelector;

0 commit comments

Comments
 (0)