Updated the defaults for Firmware Download

This commit is contained in:
vdutta 2022-10-06 18:32:40 +05:30 committed by Amin Ben Ramdhane
parent 65d4d48929
commit db45943365

View file

@ -1308,9 +1308,14 @@ static int operate_DeviceInfoFirmwareImage_Download(char *refparam, struct dmctx
char *url = dmjson_get_value((json_object *)value, 1, "URL");
char *auto_activate = dmjson_get_value((json_object *)value, 1, "AutoActivate");
if (url[0] == '\0' || auto_activate[0] == '\0')
if (url[0] == '\0')
return CMD_INVALID_ARGUMENTS;
// Assuming auto activate as false, if not provided by controller, in case of strict validation,
// this should result into a fault
if (DM_STRLEN(auto_activate) == 0)
auto_activate="0";
char *username = dmjson_get_value((json_object *)value, 1, "Username");
char *password = dmjson_get_value((json_object *)value, 1, "Password");
char *file_size = dmjson_get_value((json_object *)value, 1, "FileSize");