Skip to content

Commit f6bfc35

Browse files
authored
Update curlinterface.c
1 parent ed3798f commit f6bfc35

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

source/protocol/http/curlinterface.c

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +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
{
255-
#if defined(ENABLE_RDKB_SUPPORT)
256-
return false;
257-
#else
258-
return access("/tmp/stateRedEnabled", F_OK) == 0;
259-
#endif
256+
return access("/tmp/stateRedEnabled", F_OK) == 0;
260257
}
258+
#endif
261259
void curlCertSelectorFree()
262260
{
263261
rdkcertselector_free(&curlCertSelector);
@@ -273,7 +271,12 @@ void curlCertSelectorFree()
273271
}
274272
static void curlCertSelectorInit()
275273
{
276-
bool state_red_enable = isStateRedEnabled();
274+
bool state_red_enable = false;
275+
276+
#if defined(ENABLE_RED_RECOVERY_SUPPORT)
277+
state_red_enable = isStateRedEnabled();
278+
#endif
279+
277280
if (state_red_enable && curlRcvryCertSelector == NULL )
278281
{
279282
curlRcvryCertSelector = rdkcertselector_new( NULL, NULL, "RCVRY" );
@@ -342,9 +345,10 @@ T2ERROR sendReportOverHTTP(char *httpUrl, char *payload, pid_t* outForkedPid)
342345
}
343346
#ifdef LIBRDKCERTSEL_BUILD
344347
curlCertSelectorInit();
345-
state_red_enable = isStateRedEnabled();
346-
T2Info("%s: state_red_enable: %d\n", __func__, state_red_enable );
347-
348+
#if defined(ENABLE_RED_RECOVERY_SUPPORT)
349+
state_red_enable = isStateRedEnabled();
350+
T2Info("%s: state_red_enable: %d\n", __func__, state_red_enable );
351+
#endif
348352
if (state_red_enable)
349353
{
350354
thisCertSel = curlRcvryCertSelector;

0 commit comments

Comments
 (0)