#include <stdlib.h>
#include <system_info.h>
#include <iniparser.h>
+#include <vconf.h>
#include "amd_config.h"
#include "amd_util.h"
#define CONFIG_FG_TIMEOUT "fg_timeout"
#define CONFIG_LAUNCHPAD_MAX_LAUNCH_FAILURE "launchpad_max_launch_failure"
#define CONFIG_LOGGER_PATH "logger_path"
+#define CONFIG_BOOTING_STATUS_KEY "booting_status_key"
+#define CONFIG_BOOTING_SUCCESS_VALUE "booting_success_value"
typedef struct config_s {
tizen_profile_t profile;
unsigned int fg_timeout;
unsigned int max_launch_failure;
char *logger_path;
+ char *booting_status_key;
+ int booting_success_value;
} config;
static config __config;
return __config.logger_path;
}
+const char *_config_get_booting_status_key(void)
+{
+ return __config.booting_status_key;
+}
+
+int _config_get_booting_success_value(void)
+{
+ return __config.booting_success_value;
+}
+
static int __get_config_int(dictionary *d, const char *key)
{
char buf[512];
_I("[__CONFIG__] Logger path: %s", __config.logger_path);
}
+ str = __get_config_string(d, CONFIG_BOOTING_STATUS_KEY);
+ if (str) {
+ free(__config.booting_status_key);
+ __config.booting_status_key = strdup(str);
+ _I("[__CONFIG__] Booting status key: %s",
+ __config.booting_status_key);
+ }
+
+ r = __get_config_int(d, CONFIG_BOOTING_SUCCESS_VALUE);
+ if (r >= 0) {
+ __config.booting_success_value = r;
+ _I("[__CONFIG__] Booting Success value: %d",
+ __config.booting_success_value);
+ }
iniparser_freedict(d);
__config.fg_timeout = 5000;
__config.max_launch_failure = 5;
__config.logger_path = strdup("/var/log/appfw");
+ __config.booting_status_key = strdup(VCONFKEY_SYSMAN_BOOTINGSTATUS);
+ __config.booting_success_value = VCONFKEY_SYSMAN_BOOTING_SUCCESS;
if (__load_config_file(CONFIG_FILE_PATH) < 0)
_W("Failed to load config file");
#include <vconf.h>
#include "amd_api_noti.h"
-#include "amd_util.h"
-#include "amd_login_monitor.h"
-#include "amd_appinfo.h"
#include "amd_app_property.h"
#include "amd_app_status.h"
-#include "amd_socket.h"
-#include "amd_request.h"
-#include "amd_launch.h"
-#include "amd_signal.h"
+#include "amd_appinfo.h"
+#include "amd_config.h"
#include "amd_cynara.h"
+#include "amd_launch.h"
+#include "amd_login_monitor.h"
#include "amd_noti.h"
+#include "amd_request.h"
+#include "amd_signal.h"
+#include "amd_socket.h"
+#include "amd_util.h"
#define PATH_AUL_DAEMONS "/run/aul/daemons"
#define LOGIN_TIMEOUT_SEC 90
login_monitor->booting_status,
booting_status);
login_monitor->booting_status = booting_status;
- if (booting_status != VCONFKEY_SYSMAN_BOOTING_SUCCESS)
+ if (_config_get_booting_success_value() != booting_status)
return;
iter = user_list;
{
bool boot_finished = false;
int booting_status;
+ int booting_success;
int ret;
- if (login_monitor->booting_status == VCONFKEY_SYSMAN_BOOTING_SUCCESS)
+ booting_success = _config_get_booting_success_value();
+ if (login_monitor->booting_status == booting_success)
return true;
- ret = vconf_get_int(VCONFKEY_SYSMAN_BOOTINGSTATUS, &booting_status);
- if (ret == 0 && booting_status == VCONFKEY_SYSMAN_BOOTING_SUCCESS) {
+ ret = vconf_get_int(_config_get_booting_status_key(), &booting_status);
+ if (ret == 0 && booting_status == booting_success) {
_W("Booting success");
login_monitor->booting_status = booting_status;
return true;
return -1;
}
- r = vconf_get_int(VCONFKEY_SYSMAN_BOOTINGSTATUS, &booting_status);
+ r = vconf_get_int(_config_get_booting_status_key(), &booting_status);
if (r == 0) {
_W("booting status(%d)", booting_status);
login_monitor->booting_status = booting_status;
}
- r = vconf_notify_key_changed(VCONFKEY_SYSMAN_BOOTINGSTATUS,
+ r = vconf_notify_key_changed(_config_get_booting_status_key(),
__booting_status_changed_cb, NULL);
if (r != 0)
_W("Failed to register callback for checking booting");
if (user_list)
g_list_free_full(user_list, __destroy_user);
- vconf_ignore_key_changed(VCONFKEY_SYSMAN_BOOTINGSTATUS,
+ vconf_ignore_key_changed(_config_get_booting_status_key(),
__booting_status_changed_cb);
__fini_login_monitor();