int livebox_request_update_by_id(const char *filename)
{
- return LB_STATUS_ERROR_NOT_EXISTS;
+ return LB_STATUS_ERROR_NOT_EXIST;
}
static inline Evas *create_virtual_canvas(int w, int h)
extern void lb_turn_secured_on(void);
extern int lb_is_all_paused(void);
+extern int lb_delete_all_deleteme(void);
/*!
* Exported API for each liveboxes
Name: org.tizen.data-provider-slave
Summary: Plugin type livebox service provider.
-Version: 0.11.2
+Version: 0.11.3
Release: 1
Group: HomeTF/Livebox
License: Flora License
+static inline void rotate_log(void)
+{
+ char *filename;
+ int namelen;
+
+ if (s_info.nr_of_lines < MAX_LOG_LINE)
+ return;
+
+ s_info.file_id = (s_info.file_id + 1) % MAX_LOG_FILE;
+
+ namelen = strlen(s_info.filename) + strlen(SLAVE_LOG_PATH) + 20;
+ filename = malloc(namelen);
+ if (filename) {
+ snprintf(filename, namelen, "%s/%d_%s", SLAVE_LOG_PATH, s_info.file_id, s_info.filename);
+
+ if (s_info.fp)
+ fclose(s_info.fp);
+
+ s_info.fp = fopen(filename, "w+");
+ if (!s_info.fp)
+ ErrPrint("Failed to open a file: %s\n", filename);
+
+ DbgFree(filename);
+ }
+
+ s_info.nr_of_lines = 0;
+}
+
+
+
HAPI int critical_log(const char *func, int line, const char *fmt, ...)
{
va_list ap;
ret = vfprintf(s_info.fp, fmt, ap);
va_end(ap);
- s_info.nr_of_lines++;
- if (s_info.nr_of_lines == MAX_LOG_LINE) {
- char *filename;
- int namelen;
-
- s_info.file_id = (s_info.file_id + 1) % MAX_LOG_FILE;
+ fflush(s_info.fp);
- namelen = strlen(s_info.filename) + strlen(SLAVE_LOG_PATH) + 20;
- filename = malloc(namelen);
- if (filename) {
- snprintf(filename, namelen, "%s/%d_%s", SLAVE_LOG_PATH, s_info.file_id, s_info.filename);
-
- if (s_info.fp)
- fclose(s_info.fp);
-
- s_info.fp = fopen(filename, "w+");
- if (!s_info.fp)
- ErrPrint("Failed to open a file: %s\n", filename);
-
- free(filename);
- }
-
- s_info.nr_of_lines = 0;
- }
+ s_info.nr_of_lines++;
+ rotate_log();
return ret;
}
return;
}
- DbgPrint("ALARM: %d.%d (%d, %d)\n",
+ CRITICAL_LOG("ALARM: %d.%d (%d, %d)\n",
res_tv.tv_sec, res_tv.tv_usec, DEFAULT_LIFE_TIMER, DEFAULT_LOAD_TIMER);
} else if (so_fname) {
int fd;
}
}
- ErrPrint("=====\n");
- ErrPrint("SIGNAL> Received from PID[%d]\n", info->si_pid);
- ErrPrint("SIGNAL> Signal: %d (%d)\n", signum, info->si_signo);
- ErrPrint("SIGNAL> Error code: %d\n", info->si_code);
- ErrPrint("SIGNAL> Address: %p\n", info->si_addr);
- ErrPrint("Package: [%s] Symbol[%s]\n", so_fname, symbol);
+ CRITICAL_LOG("SIGNAL> Received from PID[%d]\n", info->si_pid);
+ CRITICAL_LOG("SIGNAL> Signal: %d (%d)\n", signum, info->si_signo);
+ CRITICAL_LOG("SIGNAL> Error code: %d\n", info->si_code);
+ CRITICAL_LOG("SIGNAL> Address: %p\n", info->si_addr);
+ CRITICAL_LOG("Package: [%s] Symbol[%s]\n", so_fname, symbol);
free(so_fname);
free(symbol);
if (!item->timer) {
ErrPrint("Failed to add timer (%s - %s, content[%s], cluster[%s], category[%s], abi[%s]\n", pkgname, id, content_info, cluster, category, abi);
update_monitor_del(id, item);
- so_destroy(inst);
+ (void)so_destroy(inst);
free(item);
return LB_STATUS_ERROR_FAULT;
}
return LB_STATUS_SUCCESS;
}
+HAPI int lb_delete_all_deleteme(void)
+{
+ Eina_List *l;
+ Eina_List *n;
+ struct item *item;
+ int cnt = 0;
+
+ DbgPrint("Delete all deleteme\n");
+ EINA_LIST_FOREACH_SAFE(s_info.item_list, l, n, item) {
+ if (!item->deleteme)
+ continue;
+
+ s_info.item_list = eina_list_remove(s_info.item_list, item);
+
+ update_monitor_del(item->inst->id, item);
+ (void)so_destroy(item->inst);
+ free(item);
+ cnt++;
+ }
+
+ DbgPrint("Deleteme: %d\n", cnt);
+ return LB_STATUS_SUCCESS;
+}
+
HAPI int lb_system_event_all(int event)
{
Eina_List *l;
DbgPrint("Current font: %s\n", s_info.font_name);
ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, &size);
+ DbgPrint("Get fontsize: %d\n", ret);
+
s_info.font_size = convert_font_size(size);
DbgPrint("Current size: %d\n", s_info.font_size);
{
int ret;
+ ret = lb_delete_all_deleteme();
+ DbgPrint("Delete all deleteme: %d\n", ret);
+
ret = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE);
+ DbgPrint("unset fontsize: %d\n", ret);
+
ret = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE);
+ DbgPrint("unset font: %d\n", ret);
ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_STIME, time_changed_cb);
DbgPrint("Remove time changed callback: %d\n", ret);
ret = update_monitor_fini();
DbgPrint("Content update monitor is finalized: %d\n", ret);
+
ret = fault_fini();
DbgPrint("Crash recover is finalized: %d\n", ret);