Name: data-provider-master
Summary: Master service provider for liveboxes.
-Version: 0.24.12
+Version: 0.24.13
Release: 1
Group: HomeTF/Livebox
License: Flora License
info->inst = inst;
info->buffer = NULL;
- DbgPrint("%dx%d size buffer is created\n", w, h);
return info;
}
buffer->refcnt = 1;
buffer->state = CREATED;
- DbgPrint("Canvas %dx%d - %d is created\n", info->w, info->h, info->pixel_size);
-
gem->attachments[0] = DRI2BufferFrontLeft;
gem->count = 1;
gem->w = info->w; /*!< This can be changed by DRI2GetBuffers */
return LB_STATUS_ERROR_MEMORY;
}
- DbgPrint("DRI2(gem) is not supported - Fallback to the S/W Backend\n");
+ ErrPrint("DRI2(gem) is not supported - Fallback to the S/W Backend\n");
return LB_STATUS_SUCCESS;
}
DRI2CreateDrawable(disp, gem->pixmap);
- DbgPrint("DRI2CreateDrawable is done\n");
gem->dri2_buffer = DRI2GetBuffers(disp, gem->pixmap,
&gem->w, &gem->h, gem->attachments, gem->count, &gem->buf_count);
DRI2DestroyDrawable(disp, gem->pixmap);
return LB_STATUS_ERROR_FAULT;
}
- DbgPrint("dri2_buffer: %p, name: %p, %dx%d\n",
- gem->dri2_buffer, gem->dri2_buffer->name, gem->w, gem->h);
- DbgPrint("dri2_buffer->pitch : %d, buf_count: %d\n",
- gem->dri2_buffer->pitch, gem->buf_count);
-
/*!
* \How can I destroy this?
*/
if (gem->dri2_buffer->pitch != gem->w * gem->depth) {
gem->compensate_data = calloc(1, gem->w * gem->h * gem->depth);
- if (!gem->compensate_data) {
+ if (!gem->compensate_data)
ErrPrint("Failed to allocate heap\n");
- } else {
- DbgPrint("Allocate compensate buffer %p(%dx%d %d)\n",
- gem->compensate_data,
- gem->w, gem->h, gem->depth);
- }
}
+ DbgPrint("dri2_buffer: %p, name: %p, %dx%d, pitch: %d, buf_count: %d, depth: %d, compensate: %p\n",
+ gem->dri2_buffer, gem->dri2_buffer->name, gem->w, gem->h,
+ gem->dri2_buffer->pitch, gem->buf_count, gem->depth, gem->compensate_data);
+
return LB_STATUS_SUCCESS;
}
gem = (struct gem_data *)buffer->data;
if (s_info.fd < 0) {
- DbgPrint("GEM is not supported - Use the fake gem buffer\n");
+ ErrPrint("GEM is not supported - Use the fake gem buffer\n");
} else {
if (!gem->pixmap_bo) {
- DbgPrint("GEM is not created\n");
+ ErrPrint("GEM is not created\n");
return NULL;
}
gem = (struct gem_data *)buffer->data;
if (s_info.fd >= 0 && !gem->pixmap_bo) {
- DbgPrint("GEM is not created\n");
+ ErrPrint("GEM is not created\n");
return;
}
gem->data = NULL;
}
} else if (gem->refcnt < 0) {
- DbgPrint("Invalid refcnt: %d (reset)\n", gem->refcnt);
+ ErrPrint("Invalid refcnt: %d (reset)\n", gem->refcnt);
gem->refcnt = 0;
}
}
if (!disp)
return LB_STATUS_ERROR_IO;
- DbgPrint("Free pixmap 0x%X\n", gem->pixmap);
+ DbgPrint("pixmap 0x%X\n", gem->pixmap);
XFreePixmap(disp, gem->pixmap);
}
tbm_bo_unref(gem->pixmap_bo);
gem->pixmap_bo = NULL;
- DbgPrint("DRI2DestroyDrawable\n");
DRI2DestroyDrawable(ecore_x_display_get(), gem->pixmap);
}
} else if (gem->data) {
int ret;
if (!info) {
- DbgPrint("buffer handler is nil\n");
+ ErrPrint("buffer handler is nil\n");
return LB_STATUS_ERROR_INVALID;
}
int ret;
if (!info) {
- DbgPrint("buffer handler is NIL\n");
+ ErrPrint("buffer handler is NIL\n");
return LB_STATUS_ERROR_INVALID;
}
int ret;
/*!
+ * \note
+ * For getting the buffer address of gem.
*/
canvas = buffer_handler_pixmap_acquire_buffer(info);
ret = buffer_handler_pixmap_release_buffer(canvas);
- DbgPrint("Canvas %p(%d) (released but still in use)\n", canvas, ret);
+ if (ret < 0)
+ ErrPrint("Failed to release buffer: %d\n", ret);
return canvas;
}
buffer = create_pixmap(info);
if (!buffer) {
- DbgPrint("Failed to create a pixmap\n");
+ ErrPrint("Failed to create a pixmap\n");
return NULL;
}
drm_magic_t magic;
if (!DRI2QueryExtension(ecore_x_display_get(), &s_info.evt_base, &s_info.err_base)) {
- DbgPrint("DRI2 is not supported\n");
+ ErrPrint("DRI2 is not supported\n");
return LB_STATUS_SUCCESS;
}
if (!DRI2QueryVersion(ecore_x_display_get(), &dri2Major, &dri2Minor)) {
- DbgPrint("DRI2 is not supported\n");
+ ErrPrint("DRI2 is not supported\n");
s_info.evt_base = 0;
s_info.err_base = 0;
return LB_STATUS_SUCCESS;
}
if (!DRI2Connect(ecore_x_display_get(), DefaultRootWindow(ecore_x_display_get()), &driverName, &deviceName)) {
- DbgPrint("DRI2 is not supported\n");
+ ErrPrint("DRI2 is not supported\n");
s_info.evt_base = 0;
s_info.err_base = 0;
return LB_STATUS_SUCCESS;
DbgFree(deviceName);
DbgFree(driverName);
if (s_info.fd < 0) {
- DbgPrint("Failed to open a drm device: (%s)\n", strerror(errno));
+ ErrPrint("Failed to open a drm device: (%s)\n", strerror(errno));
s_info.evt_base = 0;
s_info.err_base = 0;
return LB_STATUS_SUCCESS;
drmGetMagic(s_info.fd, &magic);
DbgPrint("DRM Magic: 0x%X\n", magic);
if (!DRI2Authenticate(ecore_x_display_get(), DefaultRootWindow(ecore_x_display_get()), (unsigned int)magic)) {
- DbgPrint("Failed to do authenticate for DRI2\n");
+ ErrPrint("Failed to do authenticate for DRI2\n");
if (close(s_info.fd) < 0)
ErrPrint("close: %s\n", strerror(errno));
s_info.fd = -1;
s_info.slp_bufmgr = tbm_bufmgr_init(s_info.fd);
if (!s_info.slp_bufmgr) {
- DbgPrint("Failed to init bufmgr\n");
+ ErrPrint("Failed to init bufmgr\n");
if (close(s_info.fd) < 0)
ErrPrint("close: %s\n", strerror(errno));
s_info.fd = -1;
struct data_item *data;
struct subscribe_item *item;
- DbgPrint("Client %p is destroyed\n", client);
-
invoke_global_destroyed_cb(client);
client_rpc_fini(client); /*!< Finalize the RPC after invoke destroy callbacks */
static void use_xmonitor(char *buffer)
{
g_conf.use_xmonitor = !strcasecmp(buffer, "true");
- DbgPrint("Use xmonitor: %d\n", g_conf.use_xmonitor);
}
static void use_sw_backend_handler(char *buffer)
{
g_conf.use_sw_backend = !strcasecmp(buffer, "true");
- DbgPrint("SW Backend: %d\n", g_conf.use_sw_backend);
}
static void provider_method_handler(char *buffer)
g_conf.provider_method = strdup(buffer);
if (!g_conf.provider_method)
ErrPrint("Heap: %s\n", strerror(errno));
-
- DbgPrint("Method: %s\n", g_conf.provider_method);
}
static void debug_mode_handler(char *buffer)
{
g_conf.debug_mode = !strcasecmp(buffer, "true");
- DbgPrint("Debug mode: %d\n", g_conf.debug_mode);
}
static void overwrite_content_handler(char *buffer)
{
g_conf.overwrite_content = !strcasecmp(buffer, "true");
- DbgPrint("Overwrite Content: %d\n", g_conf.overwrite_content);
}
static void com_core_thread_handler(char *buffer)
{
g_conf.com_core_thread = !strcasecmp(buffer, "true");
- DbgPrint("Com core thread: %d\n", g_conf.com_core_thread);
}
static void base_width_handler(char *buffer)
{
if (sscanf(buffer, "%d", &g_conf.base_width) != 1)
ErrPrint("Failed to parse the base_width\n");
-
- DbgPrint("Base width: %d\n", g_conf.base_width);
}
static void base_height_handler(char *buffer)
{
if (sscanf(buffer, "%d", &g_conf.base_height) != 1)
ErrPrint("Failed to parse the base_height\n");
- DbgPrint("Base height: %d\n", g_conf.base_height);
}
static void minimum_period_handler(char *buffer)
g_conf.default_conf.script = strdup(buffer);
if (!g_conf.default_conf.script)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Default script: %s\n", g_conf.default_conf.script);
}
static void default_abi_handler(char *buffer)
g_conf.default_conf.abi = strdup(buffer);
if (!g_conf.default_conf.abi)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Default ABI: %s\n", g_conf.default_conf.abi);
}
static void default_group_handler(char *buffer)
g_conf.default_conf.pd_group = strdup(buffer);
if (!g_conf.default_conf.pd_group)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Default PD Group: %s\n", g_conf.default_conf.pd_group);
}
static void default_period_handler(char *buffer)
g_conf.default_content = strdup(buffer);
if (!g_conf.default_content)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Default content: %s\n", g_conf.default_content);
}
static void default_title_handler(char *buffer)
g_conf.default_title = strdup(buffer);
if (!g_conf.default_title)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Default title: %s\n", g_conf.default_title);
}
static void minimum_space_handler(char *buffer)
{
if (sscanf(buffer, "%lu", &g_conf.minimum_space) != 1)
ErrPrint("Failed to parse the minimum_space\n");
- DbgPrint("Minimum space: %lu\n", g_conf.minimum_space);
}
static void replace_tag_handler(char *buffer)
g_conf.replace_tag = strdup(buffer);
if (!g_conf.replace_tag)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Replace Tag: %s\n", g_conf.replace_tag);
}
static void slave_ttl_handler(char *buffer)
{
if (sscanf(buffer, "%d", &g_conf.max_log_line) != 1)
ErrPrint("Failed to parse the max_log_line\n");
- DbgPrint("Max log line: %d\n", g_conf.max_log_line);
}
static void max_log_file_handler(char *buffer)
{
if (sscanf(buffer, "%d", &g_conf.max_log_file) != 1)
ErrPrint("Failed to parse the max_log_file\n");
- DbgPrint("Max log file: %d\n", g_conf.max_log_file);
}
static void sqlite_flush_max_handler(char *buffer)
{
if (sscanf(buffer, "%lu", &g_conf.sqlite_flush_max) != 1)
ErrPrint("Failed to parse the sqlite_flush_max\n");
- DbgPrint("Flush size: %lu\n", g_conf.sqlite_flush_max);
}
static void db_path_handler(char *buffer)
g_conf.path.db = strdup(buffer);
if (!g_conf.path.db)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("DB Path: %s\n", g_conf.path.db);
}
static void reader_path_handler(char *buffer)
g_conf.path.reader = strdup(buffer);
if (!g_conf.path.reader)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Reader Path: %s\n", g_conf.path.reader);
}
static void always_path_handler(char *buffer)
g_conf.path.always = strdup(buffer);
if (!g_conf.path.always)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Always Path: %s\n", g_conf.path.always);
}
static void log_path_handler(char *buffer)
g_conf.path.slave_log = strdup(buffer);
if (!g_conf.path.slave_log)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("LOG Path: %s\n", g_conf.path.slave_log);
}
static void script_port_path_handler(char *buffer)
g_conf.path.script_port = strdup(buffer);
if (!g_conf.path.script_port)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Script Port PATH: %s\n", g_conf.path.script_port);
}
static void share_path_handler(char *buffer)
g_conf.path.image = strdup(buffer);
if (!g_conf.path.image)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Shared folder: %s\n", g_conf.path.image);
}
static void input_path_handler(char *buffer)
g_conf.path.input = strdup(buffer);
if (!g_conf.path.input)
ErrPrint("Heap: %s\n", strerror(errno));
- DbgPrint("Input device: %s\n", g_conf.path.input);
}
static void ping_time_handler(char *buffer)
{
if (sscanf(buffer, "%d", &g_conf.slave_max_load) != 1)
ErrPrint("Failed to parse the slave_max_load\n");
- DbgPrint("Max load: %d\n", g_conf.slave_max_load);
}
static void pd_request_timeout_handler(char *buffer)
if (token_idx >= 0 && token_handler[token_idx].handler) {
buffer[buffer_idx] = '\0';
- DbgPrint("BUFFER: [%s]\n", buffer);
token_handler[token_idx].handler(buffer);
}
int evt_pipe[PIPE_MAX];
int tcb_pipe[PIPE_MAX];
Ecore_Fd_Handler *event_handler;
- Ecore_Fd_Handler *tcb_handler;
int (*event_cb)(enum event_state state, struct event_data *event, void *data);
void *cbdata;
char *ptr = (char *)&input_event;
int offset = 0;
int readsize = 0;
- char event_ch = EVENT_CH;
+ int fd;
DbgPrint("Initiated\n");
while (1) {
FD_ZERO(&set);
FD_SET(s_info.handle, &set);
- ret = select(s_info.handle + 1, &set, NULL, NULL, NULL);
+ FD_SET(s_info.tcb_pipe[PIPE_READ], &set);
+
+ fd = s_info.handle > s_info.tcb_pipe[PIPE_READ] ? s_info.handle : s_info.tcb_pipe[PIPE_READ];
+ ret = select(fd + 1, &set, NULL, NULL, NULL);
if (ret < 0) {
ret = -errno;
if (errno == EINTR) {
break;
}
- if (!FD_ISSET(s_info.handle, &set)) {
- ErrPrint("Unexpected handle is toggled\n");
- ret = LB_STATUS_ERROR_INVALID;
- break;
- }
-
- readsize = read(s_info.handle, ptr + offset, sizeof(input_event) - offset);
- if (readsize < 0) {
- ErrPrint("Unable to read device: %s / fd: %d / offset: %d / size: %d - %d\n", strerror(errno), s_info.handle, offset, sizeof(input_event), readsize);
- ret = LB_STATUS_ERROR_FAULT;
- break;
- }
-
- offset += readsize;
- if (offset == sizeof(input_event)) {
- offset = 0;
- if (processing_input_event(&input_event) < 0) {
+ if (FD_ISSET(s_info.handle, &set)) {
+ readsize = read(s_info.handle, ptr + offset, sizeof(input_event) - offset);
+ if (readsize < 0) {
+ ErrPrint("Unable to read device: %s / fd: %d / offset: %d / size: %d - %d\n", strerror(errno), s_info.handle, offset, sizeof(input_event), readsize);
ret = LB_STATUS_ERROR_FAULT;
break;
}
- }
- }
- if (write(s_info.tcb_pipe[PIPE_WRITE], &event_ch, sizeof(event_ch)) != sizeof(event_ch))
- ErrPrint("Unable to write PIPE: %s\n", strerror(errno));
-
- return (void *)ret;
-}
-
-static inline int reclaim_tcb_resources(void)
-{
- int status;
- struct event_data *event;
- void *ret;
-
- if (close(s_info.handle) < 0)
- ErrPrint("Unable to release the fd: %s\n", strerror(errno));
-
- s_info.handle = -1;
- DbgPrint("Event handler deactivated\n");
-
- status = pthread_join(s_info.tid, &ret);
- if (status != 0)
- ErrPrint("Failed to join a thread: %s\n", strerror(errno));
- else
- DbgPrint("Thread returns: %d\n", (int)ret);
-
- ecore_main_fd_handler_del(s_info.event_handler);
- s_info.event_handler = NULL;
-
- ecore_main_fd_handler_del(s_info.tcb_handler);
- s_info.tcb_handler = NULL;
-
- CLOSE_PIPE(s_info.tcb_pipe);
- CLOSE_PIPE(s_info.evt_pipe);
-
- EINA_LIST_FREE(s_info.event_list, event) {
- if (s_info.event_cb) {
- if (s_info.event_state == EVENT_STATE_DEACTIVATE) {
- s_info.event_state = EVENT_STATE_ACTIVATE;
- } else if (s_info.event_state == EVENT_STATE_ACTIVATE) {
- s_info.event_state = EVENT_STATE_ACTIVATED;
+ offset += readsize;
+ if (offset == sizeof(input_event)) {
+ offset = 0;
+ if (processing_input_event(&input_event) < 0) {
+ ret = LB_STATUS_ERROR_FAULT;
+ break;
+ }
}
- s_info.event_cb(s_info.event_state, event, s_info.cbdata);
}
- free(event);
- }
-
- if (s_info.event_state != EVENT_STATE_DEACTIVATE) {
- s_info.event_state = EVENT_STATE_DEACTIVATE;
- if (s_info.event_cb)
- s_info.event_cb(s_info.event_state, &s_info.event_data, s_info.cbdata);
- }
+ if (FD_ISSET(s_info.tcb_pipe[PIPE_READ], &set)) {
+ char event_ch;
- s_info.event_data.x = -1;
- s_info.event_data.y = -1;
- return LB_STATUS_SUCCESS;
-}
+ if (read(s_info.tcb_pipe[PIPE_READ], &event_ch, sizeof(event_ch)) != sizeof(event_ch))
+ ErrPrint("Unable to read TCB_PIPE: %s\n", strerror(errno));
-static Eina_Bool event_deactivate_cb(void *data, Ecore_Fd_Handler *handler)
-{
- int fd;
- char event_ch;
-
- fd = ecore_main_fd_handler_fd_get(handler);
- if (fd < 0) {
- ErrPrint("Invalid fd\n");
- return ECORE_CALLBACK_CANCEL;
- }
-
- if (read(fd, &event_ch, sizeof(event_ch)) != sizeof(event_ch)) {
- ErrPrint("Unable to read event ch: %s\n", strerror(errno));
- return ECORE_CALLBACK_CANCEL;
+ ret = LB_STATUS_ERROR_CANCEL;
+ break;
+ }
}
- DbgPrint("Deactivated event received: %c\n", event_ch);
- reclaim_tcb_resources();
- return ECORE_CALLBACK_CANCEL;
+ return (void *)ret;
}
static Eina_Bool event_read_cb(void *data, Ecore_Fd_Handler *handler)
return LB_STATUS_ERROR_FAULT;
}
- s_info.tcb_handler = ecore_main_fd_handler_add(s_info.tcb_pipe[PIPE_READ], ECORE_FD_READ, event_deactivate_cb, NULL, NULL, NULL);
- if (!s_info.event_handler) {
- ecore_main_fd_handler_del(s_info.event_handler);
- s_info.event_handler = NULL;
-
- if (close(s_info.handle) < 0)
- ErrPrint("Failed to close handle: %s\n", strerror(errno));
- s_info.handle = -1;
-
- CLOSE_PIPE(s_info.tcb_pipe);
- CLOSE_PIPE(s_info.evt_pipe);
- return LB_STATUS_ERROR_FAULT;
- }
-
status = pthread_create(&s_info.tid, NULL, event_thread_main, NULL);
if (status != 0) {
ErrPrint("Failed to initiate the thread: %s\n", strerror(status));
ecore_main_fd_handler_del(s_info.event_handler);
s_info.event_handler = NULL;
- ecore_main_fd_handler_del(s_info.tcb_handler);
- s_info.tcb_handler = NULL;
-
if (close(s_info.handle) < 0)
ErrPrint("close: %s\n", strerror(errno));
s_info.handle = -1;
HAPI int event_deactivate(void)
{
+ int status;
+ struct event_data *event;
+ void *ret;
+ char event_ch = EVENT_CH;
+
if (s_info.handle < 0) {
ErrPrint("Event handler is not actiavated\n");
return LB_STATUS_SUCCESS;
}
- return reclaim_tcb_resources();
+ if (write(s_info.tcb_pipe[PIPE_WRITE], &event_ch, sizeof(event_ch)) != sizeof(event_ch))
+ ErrPrint("Unable to write tcb_pipe: %s\n", strerror(errno));
+
+ status = pthread_join(s_info.tid, &ret);
+ if (status != 0)
+ ErrPrint("Failed to join a thread: %s\n", strerror(errno));
+ else
+ DbgPrint("Thread returns: %d\n", (int)ret);
+
+ ecore_main_fd_handler_del(s_info.event_handler);
+ s_info.event_handler = NULL;
+
+ if (close(s_info.handle) < 0)
+ ErrPrint("Unable to release the fd: %s\n", strerror(errno));
+
+ s_info.handle = -1;
+ DbgPrint("Event handler deactivated\n");
+
+ CLOSE_PIPE(s_info.tcb_pipe);
+ CLOSE_PIPE(s_info.evt_pipe);
+
+ EINA_LIST_FREE(s_info.event_list, event) {
+ if (s_info.event_cb) {
+ if (s_info.event_state == EVENT_STATE_DEACTIVATE) {
+ s_info.event_state = EVENT_STATE_ACTIVATE;
+ } else if (s_info.event_state == EVENT_STATE_ACTIVATE) {
+ s_info.event_state = EVENT_STATE_ACTIVATED;
+ }
+ s_info.event_cb(s_info.event_state, event, s_info.cbdata);
+ }
+ free(event);
+ }
+
+ if (s_info.event_state != EVENT_STATE_DEACTIVATE) {
+ s_info.event_state = EVENT_STATE_DEACTIVATE;
+
+ if (s_info.event_cb)
+ s_info.event_cb(s_info.event_state, &s_info.event_data, s_info.cbdata);
+ }
+
+ s_info.event_data.x = -1;
+ s_info.event_data.y = -1;
+ return LB_STATUS_SUCCESS;
}
HAPI int event_is_activated(void)
return;
client_rpc_async_request(client, packet);
- DbgPrint("Fault package: %s\n", pkgname);
}
HAPI void fault_broadcast_info(const char *pkgname, const char *filename, const char *func)
}
client_broadcast(NULL, packet);
- DbgPrint("Fault package: %s\n", pkgname);
}
static inline void dump_fault_info(const char *name, pid_t pid, const char *pkgname, const char *filename, const char *funcname)
{
struct fb_info *info = data;
- DbgPrint("FB size: %d\n", size);
-
if (buffer_handler_load(info->buffer) < 0) {
ErrPrint("Failed to load buffer handler\n");
return NULL;
Evas *e;
buffer_handler_get_size(info->buffer, &ow, &oh);
- DbgPrint("Buffer handler size: %dx%d\n", ow, oh);
if (ow == 0 && oh == 0) {
DbgPrint("ZERO Size FB accessed\n");
return LB_STATUS_SUCCESS;
cluster->category_list = NULL;
- DbgPrint("Cluster %s is created\n", cluster->name);
s_info.cluster_list = eina_list_append(s_info.cluster_list, cluster);
return cluster;
}
category->cluster = cluster;
category->info_list = NULL;
- DbgPrint("Category %s is created\n", category->name);
cluster->category_list = eina_list_append(cluster->category_list, category);
return category;
}
group_destroy_category(category);
}
- DbgPrint("Destroy cluster: %s\n", cluster->name);
DbgFree(cluster->name);
DbgFree(cluster);
}
group_destroy_context_info(info);
}
- DbgPrint("Destroy category: %s\n", category->name);
DbgFree(category->name);
DbgFree(category);
}
DbgFree(name);
return LB_STATUS_ERROR_FAULT;
}
- DbgPrint("Keep this syntax only for the compatibility\n");
} else if (is_open == 2) {
item = group_add_context_item(info, name);
if (!item) {
return LB_STATUS_ERROR_FAULT;
}
- DbgPrint("Keep this syntax only for the compatibility: %s\n", name);
state = CLUSTER;
break;
case CONTEXT_ITEM:
return LB_STATUS_ERROR_FAULT;
}
- DbgPrint("Keep this syntax only for the compatibility: %s\n", name);
state = CLUSTER;
} else if (is_open == 2) {
state = CATEGORY;
pending = ecore_timer_pending_get(inst->update_timer);
delay = util_time_delay_for_compensation(period) - pending;
ecore_timer_delay(inst->update_timer, delay);
- DbgPrint("Compensated: %lf\n", delay);
if (inst->sleep_at == 0.0f)
return;
sleep_time = util_timestamp() - inst->sleep_at;
- if (sleep_time > pending) {
- DbgPrint("Update time elapsed\n");
+ if (sleep_time > pending)
(void)update_timer_cb(inst);
- }
inst->sleep_at = 0.0f;
}
DbgPrint("%d is deleted from the list of viewer of %s(%s)\n", client_pid(client), package_name(instance_package(inst)), instance_id(inst));
if (!eina_list_data_find(inst->client_list, client)) {
- DbgPrint("Not found\n");
+ ErrPrint("Not found\n");
return LB_STATUS_ERROR_NOT_EXIST;
}
else
id = "";
- DbgPrint("Size is changed to %dx%d (%s) %s\n", w, h, id, is_pd ? "pd" : "lb");
-
packet = packet_create_noack("size_changed", "sssiiii", pkgname, inst->id, id, is_pd, w, h, status);
if (packet)
CLIENT_SEND_EVENT(inst, packet);
{
struct inst_info *inst = (struct inst_info *)data;
- DbgPrint("Update instance %s (%s) %s/%s\n", package_name(inst->info), inst->id, inst->cluster, inst->category);
slave_rpc_request_update(package_name(inst->info), inst->id, inst->cluster, inst->category);
return ECORE_CALLBACK_RENEW;
}
if (package_secured(info)) {
if (inst->lb.period > 0.0f) {
- DbgPrint("Register the update timer for secured livebox [%s]\n", package_name(info));
inst->update_timer = util_timer_add(inst->lb.period, update_timer_cb, inst);
if (!inst->update_timer)
ErrPrint("Failed to add an update timer for instance %s\n", inst->id);
else
timer_freeze(inst); /* Freeze the update timer as default */
} else {
- DbgPrint("secured livebox [%s] has no period (%lf)\n", package_name(info), inst->lb.period);
inst->update_timer = NULL;
}
}
*/
if (!packet) {
- DbgPrint("Consuming a request of a dead process\n");
/*!
* \note
* The instance_reload will care this.
*/
switch (inst->requested_state) {
case INST_ACTIVATED:
- DbgPrint("REQ: ACTIVATED\n");
instance_state_reset(inst);
instance_reactivate(inst);
break;
instance_broadcast_deleted_event(inst);
instance_state_reset(inst);
instance_destroy(inst);
- DbgPrint("== %s\n", package_name(info));
default:
/*!< Unable to reach here */
break;
* This is not possible, slave will always return LB_STATUS_ERROR_NOT_EXIST, LB_STATUS_ERROR_INVALID, or 0.
* but care this exceptional case.
*/
- DbgPrint("[%s] instance destroying ret(%d)\n", package_name(inst->info), ret);
info = inst->info;
instance_broadcast_deleted_event(inst);
instance_state_reset(inst);
int is_pinned_up;
if (!packet) {
- DbgPrint("Consuming a request of a dead process\n");
/*!
* \note
* instance_reload function will care this.
DbgFree(inst->content);
inst->content = tmp;
-
- DbgPrint("Update content info %s\n", tmp);
}
if (strlen(title)) {
DbgFree(inst->title);
inst->title = tmp;
-
- DbgPrint("Update title info %s\n", tmp);
}
if (inst->state == INST_DESTROYED) {
break;
default:
info = inst->info;
- DbgPrint("[%s] instance destroying ret(%d)\n", package_name(info), ret);
instance_broadcast_deleted_event(inst);
instance_state_reset(inst);
instance_destroy(inst);
int is_pinned_up;
if (!packet) {
- DbgPrint("Consuming a request of a dead process\n");
/*!
* \note
* instance_reload will care this
}
break;
default:
- DbgPrint("[%s] instance destroying ret(%d)\n", package_name(inst->info), ret);
instance_unicast_deleted_event(inst, NULL);
instance_state_reset(inst);
instance_destroy(inst);
}
if (package_is_fault(inst->info)) {
- DbgPrint("Fault package [%s]\n", package_name(inst->info));
+ ErrPrint("Fault package [%s]\n", package_name(inst->info));
return LB_STATUS_ERROR_FAULT;
}
}
if (package_is_fault(inst->info)) {
- DbgPrint("Fault package [%s]\n", package_name(inst->info));
+ ErrPrint("Fault package [%s]\n", package_name(inst->info));
return LB_STATUS_ERROR_FAULT;
}
{
struct packet *packet;
- if (inst->scroll_locked == hold) {
- DbgPrint("[HOLD] There is changes for hold state: %d\n", hold);
+ DbgPrint("HOLD: (%s) %d\n", inst->id, hold);
+ if (inst->scroll_locked == hold)
return LB_STATUS_ERROR_ALREADY;
- }
packet = packet_create_noack("scroll", "ssi", package_name(inst->info), inst->id, hold);
if (!packet) {
- ErrPrint("[HOLD] Failed to build a packet\n");
+ ErrPrint("Failed to build a packet\n");
return LB_STATUS_ERROR_FAULT;
}
- DbgPrint("[HOLD] (%s) %d\n", inst->id, hold);
inst->scroll_locked = hold;
return CLIENT_SEND_EVENT(inst, packet);
}
struct update_mode_cbdata *cbdata;
if (package_is_fault(inst->info)) {
- DbgPrint("Fault package [%s]\n", package_name(inst->info));
+ ErrPrint("Fault package [%s]\n", package_name(inst->info));
return LB_STATUS_ERROR_FAULT;
}
}
if (package_is_fault(inst->info)) {
- DbgPrint("Fault package [%s]\n", package_name(inst->info));
+ ErrPrint("Fault package [%s]\n", package_name(inst->info));
return LB_STATUS_ERROR_FAULT;
}
if (!inst->update_timer)
return LB_STATUS_ERROR_INVALID;
- DbgPrint("Freeze the update timer (%s)\n", inst->id);
timer_freeze(inst);
return LB_STATUS_SUCCESS;
}
if (!inst->update_timer)
return LB_STATUS_ERROR_INVALID;
- if (client_is_all_paused() || setting_is_lcd_off()) {
- DbgPrint("Skip thaw (%s)\n", inst->id);
+ if (client_is_all_paused() || setting_is_lcd_off())
return LB_STATUS_ERROR_INVALID;
- }
- if (inst->visible == LB_HIDE_WITH_PAUSE) {
- DbgPrint("Live box is invisible (%s)\n", inst->id);
+ if (inst->visible == LB_HIDE_WITH_PAUSE)
return LB_STATUS_ERROR_INVALID;
- }
- DbgPrint("Thaw the update timer (%s)\n", inst->id);
timer_thaw(inst);
return LB_STATUS_SUCCESS;
}
HAPI int instance_set_visible_state(struct inst_info *inst, enum livebox_visible_state state)
{
- if (inst->visible == state) {
- DbgPrint("Visibility has no changed\n");
+ if (inst->visible == state)
return LB_STATUS_SUCCESS;
- }
switch (state) {
case LB_SHOW:
return LB_STATUS_ERROR_FAULT;
}
- DbgPrint("RESIZE: INSTANCE[%s] Request resize[%dx%d] box\n", instance_id(inst), w, h);
+ DbgPrint("RESIZE: [%s] resize[%dx%d]\n", instance_id(inst), w, h);
ret = slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, resize_cb, cbdata, 0);
return ret;
}
inst = cbdata->inst;
DbgFree(cbdata);
- DbgPrint("Update period is changed to %lf from %lf\n", period, inst->lb.period);
-
inst->lb.period = period;
if (inst->update_timer) {
if (inst->lb.period == 0.0f) {
}
if (package_is_fault(inst->info)) {
- DbgPrint("Fault package [%s]\n", package_name(inst->info));
+ ErrPrint("Fault package [%s]\n", package_name(inst->info));
return LB_STATUS_ERROR_FAULT;
}
}
if (package_is_fault(inst->info)) {
- DbgPrint("Fault package [%s]\n", package_name(inst->info));
+ ErrPrint("Fault package [%s]\n", package_name(inst->info));
return LB_STATUS_ERROR_FAULT;
}
}
if (package_is_fault(inst->info)) {
- DbgPrint("Fault package [%s]\n", package_name(inst->info));
+ ErrPrint("Fault package [%s]\n", package_name(inst->info));
return LB_STATUS_ERROR_FAULT;
}
}
if (package_is_fault(inst->info)) {
- DbgPrint("Fault package [%s]\n", package_name(inst->info));
+ ErrPrint("Fault package [%s]\n", package_name(inst->info));
return LB_STATUS_ERROR_FAULT;
}
*/
(void)slave_freeze_ttl(slave);
+ DbgPrint("CREATE_PD\n");
ret = slave_rpc_request_only(slave, pkgname, packet, 0);
if (ret < 0) {
ErrPrint("Unable to send request to slave\n");
}
inst->pd.owner = client;
- DbgPrint("pd,show event is sent\n");
return ret;
}
HAPI int instance_client_pd_destroyed(struct inst_info *inst, int status)
{
if (!inst->pd.need_to_send_close_event) {
- DbgPrint("PD is not created\n");
+ ErrPrint("PD is not created\n");
return LB_STATUS_ERROR_INVALID;
}
state = ERROR;
} else {
group[idx] = '\0';
- DbgPrint("group: %s\n", group);
state = TAG;
idx = 0;
ptr = NULL;
tag_id = idx;
idx = 0;
ptr = NULL;
- DbgPrint("tag: %s\n", field[tag_id]);
} else if (*ptr == ch) {
ptr++;
} else {
} else if (isspace(ch)) {
int ret;
pkgname[idx] = '\0';
- DbgPrint("value: %s\n", pkgname);
- DbgPrint("Add [%s] - [%s]\n", group, pkgname);
ret = abi_add_entry(group, pkgname);
if (ret != 0)
ErrPrint("Failed to add %s for %s\n", pkgname, group);
if (idx) {
int ret;
pkgname[idx] = '\0';
- DbgPrint("value: %s\n", pkgname);
- DbgPrint("Add [%s] - [%s]\n", group, pkgname);
ret = abi_add_entry(group, pkgname);
if (ret != 0)
ErrPrint("Failed to add %s for %s\n", pkgname, group);
tmp = (const char *)sqlite3_column_text(stmt, 4);
if (tmp && strlen(tmp)) {
package_set_lb_path(info, tmp);
- DbgPrint("LB Path: %s\n", tmp);
tmp = (const char *)sqlite3_column_text(stmt, 5);
if (tmp && strlen(tmp))
tmp = (const char *)sqlite3_column_text(stmt, 7);
if (tmp && strlen(tmp)) {
package_set_pd_path(info, tmp);
- DbgPrint("PD Path: %s\n", tmp);
tmp = (const char *)sqlite3_column_text(stmt, 8);
if (tmp && strlen(tmp))
struct inst_info *inst;
Eina_List *l;
- if (slave_state(info->slave) != SLAVE_TERMINATED) {
- DbgPrint("Skip this\n");
+ if (slave_state(info->slave) != SLAVE_TERMINATED)
return 0;
- }
EINA_LIST_FOREACH(info->inst_list, l, inst) {
instance_freeze_updator(inst);
struct inst_info *inst;
Eina_List *l;
- if (slave_state(info->slave) != SLAVE_TERMINATED) {
- DbgPrint("Skip this\n");
+ if (slave_state(info->slave) != SLAVE_TERMINATED)
return 0;
- }
EINA_LIST_FOREACH(info->inst_list, l, inst) {
instance_thaw_updator(inst);
return LB_STATUS_ERROR_INVALID;
}
- DbgPrint("Slave package: \"%s\" (abi: %s)\n", tmp, info->abi);
s_pkgname = util_replace_string(tmp, REPLACE_TAG_APPID, info->pkgname);
if (!s_pkgname) {
DbgPrint("Failed to get replaced string\n");
}
}
- DbgPrint("New slave name is %s, it is assigned for livebox %s (using %s)\n", s_name, info->pkgname, s_pkgname);
+ DbgPrint("New slave[%s] is assigned for %s (using %s / abi[%s])\n", s_name, info->pkgname, s_pkgname, info->abi);
info->slave = slave_create(s_name, info->secured, info->abi, s_pkgname, info->network);
DbgFree(s_name);
if (ret < 0)
return ret;
} else {
- DbgPrint("Slave %s is assigned for %s\n", slave_name(info->slave), info->pkgname);
+ DbgPrint("Slave %s is used for %s\n", slave_name(info->slave), info->pkgname);
}
slave_ref(info->slave);
Eina_List *n;
struct inst_info *inst;
- DbgPrint("Livebox package %s is uninstalled\n", pkgname);
+ DbgPrint("Package %s is uninstalled\n", pkgname);
info = package_find(pkgname);
if (!info) {
DbgPrint("%s is not yet loaded\n", pkgname);
return 0;
ret = io_update_livebox_package(pkgname, io_install_cb, NULL);
- DbgPrint("Processed %d packages\n", ret);
return 0;
}
if (status == PKGMGR_STATUS_START) {
ret = io_update_livebox_package(pkgname, io_uninstall_cb, NULL);
- DbgPrint("Processed %d packages\n", ret);
if (ret == 0) {
/*! for keeping the old style */
(void)io_uninstall_cb(pkgname, -1, NULL);
return 0;
ret = io_update_livebox_package(pkgname, io_update_cb, NULL);
- DbgPrint("Processed %d packages\n", ret);
return 0;
}
return LB_STATUS_ERROR_FAULT;
}
- DbgPrint("Conf file is %s for package %s\n", filename, pkgname);
+ DbgPrint("Conf file %s for package %s\n", filename, pkgname);
EINA_LIST_FOREACH(s_list, l, item) {
if (!strcmp(item->filename, filename)) {
linelen = 0;
do {
c = getc(fp);
- if ((c == EOF) && (state == VALUE)) {
- DbgPrint("[%s:%d] VALUE state EOF\n", __func__, __LINE__);
+ if ((c == EOF) && (state == VALUE))
state = END;
- }
switch (state) {
case COMMENT:
struct script_info *info;
if (instance_state(inst) != INST_ACTIVATED) {
- DbgPrint("Render pre invoked but instance is not activated\n");
+ ErrPrint("Render pre invoked but instance is not activated\n");
return;
}
inst = data;
if (instance_state(inst) != INST_ACTIVATED) {
- DbgPrint("Render post invoked but instance is not activated\n");
+ ErrPrint("Render post invoked but instance is not activated\n");
return;
}
{
struct script_info *info;
- DbgPrint("Create script: %s (%s)\n", file, option);
+ DbgPrint("Create script: %s (%s) %dx%d\n", file, option, w, h);
if (!file)
return NULL;
return NULL;
}
- DbgPrint("Update info [%dx%d]\n", w, h);
info->w = w;
info->h = h;
goto out;
}
- DbgPrint("pid[%d] pkgname[%s] emission[%s] source[%s]\n", pid, pkgname, emission, source);
-
/*!
* \NOTE:
* Trust the package name which are sent by the client.
return ECORE_CALLBACK_CANCEL;
}
-/*
-static inline void clear_pd_monitor(struct inst_info *inst)
-{
- Ecore_Timer *pd_monitor;
-
- pd_monitor = instance_del_data(inst, "pd,open,monitor");
- if (pd_monitor) {
- DbgPrint("Clear pd,open,monitor\n");
- (void)instance_client_pd_created(inst, LB_STATUS_SUCCESS);
- ecore_timer_del(pd_monitor);
- (void)instance_unref(inst);
- return;
- }
-
- pd_monitor = instance_del_data(inst, "pd,close,monitor");
- if (pd_monitor) {
- DbgPrint("Clear pd,close,monitor\n");
- (void)instance_client_pd_destroyed(inst, LB_STATUS_SUCCESS);
- ecore_timer_del(pd_monitor);
- (void)instance_unref(inst);
- return;
- }
-
- pd_monitor = instance_del_data(inst, "pd,resize,monitor");
- if (pd_monitor) {
- DbgPrint("Clear pd,resize,monitor\n");
- (void)instance_client_pd_destroyed(inst, LB_STATUS_SUCCESS);
- ecore_timer_del(pd_monitor);
- (void)instance_unref(inst);
- return;
- }
-}
-*/
-
static struct packet *client_delete(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, ret */
{
struct client_node *client;
goto out;
}
- DbgPrint("pid[%d] pkgname[%s]\n", pid, pkgname);
-
/*!
* \NOTE:
* Trust the package name which are sent by the client.
* So We have to make a delay to send a deleted event.
*/
- DbgPrint("Client has PD\n");
item->client = client_ref(client);
item->inst = instance_ref(inst);
}
}
} else {
- DbgPrint("Client has no permission\n");
+ ErrPrint("Client has no permission\n");
ret = LB_STATUS_ERROR_PERMISSION;
}
} else {
- DbgPrint("Ok. destroy instance\n");
- //clear_pd_monitor(inst);
ret = instance_destroy(inst);
}
goto out;
}
- DbgPrint("Buffer type PD\n");
-
packet_ref((struct packet *)packet);
ret = slave_rpc_request_only(slave, pkgname, (struct packet *)packet, 0);
} else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
script = instance_pd_script(inst);
if (!script) {
- DbgPrint("Script is not created yet\n");
+ ErrPrint("Script is not created yet\n");
ret = LB_STATUS_ERROR_FAULT;
goto out;
}
e = script_handler_evas(script);
if (!e) {
- DbgPrint("Evas is not exists\n");
+ ErrPrint("Evas is not exists\n");
ret = LB_STATUS_ERROR_FAULT;
goto out;
}
cbdata->status = ret;
if (!ecore_timer_add(DELAY_TIME, lazy_access_status_cb, cbdata)) {
- DbgPrint("Failed to add timer\n");
+ ErrPrint("Failed to add timer\n");
(void)instance_unref(cbdata->inst);
DbgFree(cbdata);
ret = LB_STATUS_ERROR_FAULT;
} else {
- DbgPrint("Timer is added\n");
ret = LB_STATUS_SUCCESS;
}
}
if (instance_unref(data)) {
int ret;
ret = instance_client_pd_created(data, LB_STATUS_SUCCESS);
- DbgPrint("Send PD Create event (%d)\n", ret);
+ DbgPrint("Send PD Create event (%d) to client\n", ret);
}
}
if (instance_unref(data)) {
int ret;
ret = instance_client_pd_destroyed(data, LB_STATUS_SUCCESS);
- DbgPrint("Send PD Destroy event (%d)\n", ret);
+ DbgPrint("Send PD Destroy event (%d) to client\n", ret);
}
}
double x;
double y;
+ DbgPrint("CREATE_PD\n");
+
client = client_find_by_pid(pid);
if (!client) {
ErrPrint("Client %d is not exists\n", pid);
} else if (instance_state(inst) == INST_DESTROYED) {
ErrPrint("Instance(%s) is already destroyed\n", id);
} else {
- //clear_pd_monitor(inst);
ret = instance_destroy(inst);
}
ret = validate_request(pkgname, id, &inst, NULL);
if (ret == LB_STATUS_SUCCESS) {
- //clear_pd_monitor(inst);
ret = instance_destroyed(inst);
}
if (!inst) {
fprintf(fp, "%d\n", ENOENT);
} else {
- //clear_pd_monitor(inst);
(void)instance_destroy(inst);
fprintf(fp, "%d\n", 0);
}
if (ret < 0) {
ret = -errno;
if (errno == EINTR) {
- DbgPrint("INTERRUPTED\n");
+ ErrPrint("INTERRUPTED\n");
ret = 0;
continue;
}
remain = curtime % _period;
ret = (double)remain / (double)1000000;
- DbgPrint("curtime: %llu, _period: %llu, remain: %llu, ret: %lf, result: %lf\n", curtime, _period, remain, ret, period - ret);
return period - ret;
}
return ECORE_CALLBACK_PASS_ON;
if (!strcmp(name, "_X_ILLUME_DEACTIVATE_WINDOW")) {
- DbgPrint("PAUSE EVENT\n");
xmonitor_pause(client);
} else if (!strcmp(name, "_X_ILLUME_ACTIVATE_WINDOW")) {
- DbgPrint("RESUME EVENT\n");
xmonitor_resume(client);
} else {
/* ignore event */