Skip to content

Commit

Permalink
Merge pull request xmidt-org#226 from nlrcomcast/retain_webconfig
Browse files Browse the repository at this point in the history
Removing POST-NONE for FR, and Added Post none retain header
  • Loading branch information
sadhyama authored Feb 29, 2024
2 parents cd22bce + 0188393 commit d46b2b2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/webcfg_multipart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,13 +1410,7 @@ void derive_root_doc_version_string(char **rootVersion, uint32_t *root_ver, int

if(db_root_string !=NULL)
{
if((strcmp(db_root_string,"POST-NONE")==0) && (strcmp(g_RebootReason,FW_UPGRADE_REBOOT_REASON)!=0) && (strcmp(g_RebootReason,FORCED_FW_UPGRADE_REBOOT_REASON)!=0) && (strcmp(g_RebootReason,FACTORY_RESET_REBOOT_REASON)!=0))
{
*rootVersion = strdup("NONE-REBOOT");
WEBCFG_FREE(db_root_string);
return;
}
else if(status == 404 && ((strcmp(db_root_string, "NONE") == 0) || (strcmp(db_root_string, "NONE-MIGRATION") == 0) || (strcmp(db_root_string, "NONE-REBOOT") == 0)))
if(status == 404 && ((strcmp(db_root_string, "NONE") == 0) || (strcmp(db_root_string, "NONE-MIGRATION") == 0) || (strcmp(db_root_string, "NONE-REBOOT") == 0)))
{
*rootVersion = strdup("POST-NONE");
WEBCFG_FREE(db_root_string);
Expand Down Expand Up @@ -1595,6 +1589,8 @@ void createCurlHeader( struct curl_slist *list, struct curl_slist **header_list,
list = curl_slist_append(list, version_header);
WEBCFG_FREE(version_header);
}
WebcfgInfo("Post none retain header formed POST-NONE-RETAIN: true\n");
list = curl_slist_append(list, "POST-NONE-RETAIN: true");
}
list = curl_slist_append(list, "Accept: application/msgpack");

Expand Down

0 comments on commit d46b2b2

Please sign in to comment.