|
@@ -417,14 +417,17 @@ static int unload_root_ini(sp_cfg_root_ini_t *root, int shm)
|
|
|
|
|
|
static int load_shell_ini(sp_dir_t *dir, sp_cfg_shell_ini_t *shell, sp_cfg_root_ini_t *root,const char *file, const char *fileVar = NULL)
|
|
|
{
|
|
|
- int rc;
|
|
|
+ int rc = -1;
|
|
|
int i;
|
|
|
array_header_t *arr;
|
|
|
char *str;
|
|
|
|
|
|
shell->software_version.build = 0;
|
|
|
- rc = read_ini_version(file, "Main", "SoftwareVersion",
|
|
|
- &shell->software_version.major, &shell->software_version.minor, &shell->software_version.revision, NULL);
|
|
|
+ if (NULL != fileVar)
|
|
|
+ rc = read_ini_version(fileVar, "Main", "SoftwareVersion", &shell->software_version.major, &shell->software_version.minor, &shell->software_version.revision, NULL);
|
|
|
+ if (rc != 0)
|
|
|
+ rc = read_ini_version(file, "Main", "SoftwareVersion", &shell->software_version.major, &shell->software_version.minor, &shell->software_version.revision, NULL);
|
|
|
+
|
|
|
if (rc != 0) {
|
|
|
sp_dbg_warn("read Main::SoftwareVersion failed!");
|
|
|
return rc;
|