Skip to content
Closed
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
10 changes: 8 additions & 2 deletions source/protocol/http/curlinterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,12 @@ static T2ERROR setPayload(CURL *curl, const char* payload, childResponse *childC
return T2ERROR_SUCCESS;
}
#ifdef LIBRDKCERTSEL_BUILD
#if defined(ENABLE_RED_RECOVERY_SUPPORT)
bool isStateRedEnabled(void)
{
return access("/tmp/stateRedEnabled", F_OK) == 0;
}
#endif
void curlCertSelectorFree()
{
rdkcertselector_free(&curlCertSelector);
Expand All @@ -269,7 +271,10 @@ void curlCertSelectorFree()
}
static void curlCertSelectorInit()
{
bool state_red_enable = isStateRedEnabled();
bool state_red_enable = false;
#if defined(ENABLE_RED_RECOVERY_SUPPORT)
state_red_enable = isStateRedEnabled();
#endif
if (state_red_enable && curlRcvryCertSelector == NULL )
{
curlRcvryCertSelector = rdkcertselector_new( NULL, NULL, "RCVRY" );
Expand Down Expand Up @@ -338,9 +343,10 @@ T2ERROR sendReportOverHTTP(char *httpUrl, char *payload, pid_t* outForkedPid)
}
#ifdef LIBRDKCERTSEL_BUILD
curlCertSelectorInit();
#if defined(ENABLE_RED_RECOVERY_SUPPORT)
state_red_enable = isStateRedEnabled();
T2Info("%s: state_red_enable: %d\n", __func__, state_red_enable );

#endif
if (state_red_enable)
{
thisCertSel = curlRcvryCertSelector;
Expand Down
Loading