2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dlfcn.h> /* dlopen */
20 #include <stdlib.h> /* malloc, free */
21 #include <string.h> /* strcmp */
26 #include <heap-monitor.h>
27 #include <livebox-service.h>
30 #include "critical_log.h"
32 #include "so_handler.h"
40 Eina_List *livebox_list;
45 static inline struct so_item *find_livebox(const char *pkgname)
50 EINA_LIST_FOREACH(s_info.livebox_list, l, item) {
51 if (!strcmp(item->pkgname, pkgname))
58 static inline char *so_adaptor_alloc(const char *abi)
60 /* TODO: Implement me */
61 DbgPrint("ABI[%s] loads %s\n", abi, "/usr/lib/liblivebox-cpp.so");
62 return strdup("/usr/lib/liblivebox-cpp.so");
65 static inline char *old_style_path(const char *pkgname)
71 path_len = (strlen(pkgname) * 2) + strlen(MODULE_PATH);
72 path = malloc(path_len);
74 ErrPrint("Memory: %s\n", strerror(errno));
78 ret = snprintf(path, path_len, MODULE_PATH, pkgname, pkgname);
80 ErrPrint("Fault: %s\n", strerror(errno));
85 DbgPrint("Fallback to old style libexec path (%s)\n", path);
89 static inline char *so_path_alloc(const char *pkgname)
94 lb_pkgname = livebox_service_pkgname(pkgname);
96 path = old_style_path(pkgname);
98 path = livebox_service_libexec(lb_pkgname);
102 DbgPrint("so path: %s\n", path);
106 static void delete_livebox(struct so_item *item)
108 if (item->adaptor.finalize) {
110 fault_mark_call(item->pkgname, "finalize", __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
111 ret = item->adaptor.finalize(item->pkgname);
112 fault_unmark_call(item->pkgname, "finalize", __func__, USE_ALARM);
114 ErrPrint("Package %s, finalize returns %d\n", item->pkgname, ret);
115 } else if (item->livebox.finalize) {
117 fault_mark_call(item->pkgname, "finalize", __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
118 ret = item->livebox.finalize();
119 fault_unmark_call(item->pkgname, "finalize", __func__, USE_ALARM);
121 ErrPrint("Package %s, finalize returns %d\n", item->pkgname, ret);
124 heap_monitor_del_target(item->so_fname);
125 dlclose(item->handle);
126 free(item->so_fname);
131 static struct so_item *new_adaptor(const char *pkgname, const char *abi)
133 struct so_item *item;
135 item = calloc(1, sizeof(*item));
137 ErrPrint("Memory: %s\n", strerror(errno));
141 item->pkgname = strdup(pkgname);
142 if (!item->pkgname) {
143 ErrPrint("Memory: %s\n", strerror(errno));
153 * item->has_livbox_script
156 item->inst_list = NULL;
158 item->so_fname = so_adaptor_alloc(abi);
159 if (!item->so_fname) {
165 fault_mark_call(pkgname, __func__, __func__, USE_ALARM, DEFAULT_LOAD_TIMER);
166 item->handle = dlopen(item->so_fname, RTLD_LOCAL | RTLD_NOW | RTLD_DEEPBIND);
168 fault_unmark_call(pkgname, __func__, __func__, USE_ALARM);
169 ErrPrint("dlopen: %s - %s\n", dlerror(), item->so_fname);
170 free(item->so_fname);
175 fault_unmark_call(pkgname, __func__, __func__, USE_ALARM);
177 item->adaptor.create = (adaptor_create_t)dlsym(item->handle, "livebox_create");
178 if (!item->adaptor.create) {
179 ErrPrint("symbol: livebox_create - %s\n", dlerror());
180 delete_livebox(item);
184 item->adaptor.destroy = (adaptor_destroy_t)dlsym(item->handle, "livebox_destroy");
185 if (!item->adaptor.destroy) {
186 ErrPrint("symbol: livebox_destroy - %s\n", dlerror());
187 delete_livebox(item);
191 item->adaptor.pinup = (adaptor_pinup_t)dlsym(item->handle, "livebox_pinup");
192 if (!item->adaptor.pinup)
193 ErrPrint("symbol: livebox_pinup - %s\n", dlerror());
195 item->adaptor.is_updated = (adaptor_is_updated_t)dlsym(item->handle, "livebox_need_to_update");
196 if (!item->adaptor.is_updated)
197 ErrPrint("symbol: livebox_need_to_update - %s\n", dlerror());
199 item->adaptor.update_content = (adaptor_update_content_t)dlsym(item->handle, "livebox_update_content");
200 if (!item->adaptor.update_content)
201 ErrPrint("symbol: livebox_update_content - %s\n", dlerror());
203 item->adaptor.clicked = (adaptor_clicked_t)dlsym(item->handle, "livebox_clicked");
204 if (!item->adaptor.clicked)
205 ErrPrint("symbol: livebox_clicked - %s\n", dlerror());
207 item->adaptor.script_event = (adaptor_script_t)dlsym(item->handle, "livebox_content_event");
208 if (!item->adaptor.script_event)
209 ErrPrint("symbol: livebox_content_event - %s\n", dlerror());
211 item->adaptor.resize = (adaptor_resize_t)dlsym(item->handle, "livebox_resize");
212 if (!item->adaptor.resize)
213 ErrPrint("symbol: livebox_resize - %s\n", dlerror());
215 item->adaptor.create_needed = (adaptor_create_needed_t)dlsym(item->handle, "livebox_need_to_create");
216 if (!item->adaptor.create_needed)
217 ErrPrint("symbol: livebox_need_to_create - %s\n", dlerror());
219 item->adaptor.change_group = (adaptor_change_group_t)dlsym(item->handle, "livebox_change_group");
220 if (!item->adaptor.change_group)
221 ErrPrint("symbol: livebox_change_group - %s\n", dlerror());
223 item->adaptor.get_output_info = (adaptor_get_output_info_t)dlsym(item->handle, "livebox_get_info");
224 if (!item->adaptor.get_output_info)
225 ErrPrint("symbol: livebox_get_info - %s\n", dlerror());
227 item->adaptor.initialize = (adaptor_initialize_t)dlsym(item->handle, "livebox_initialize");
228 if (!item->adaptor.initialize)
229 ErrPrint("symbol: livebox_initialize - %s\n", dlerror());
231 item->adaptor.finalize = (adaptor_finalize_t)dlsym(item->handle, "livebox_finalize");
232 if (!item->adaptor.finalize)
233 ErrPrint("symbol: livebox_finalize - %s\n", dlerror());
235 item->adaptor.need_to_destroy = (adaptor_need_to_destroy_t)dlsym(item->handle, "livebox_need_to_destroy");
236 if (!item->adaptor.need_to_destroy)
237 ErrPrint("symbol: livebox_need_to_destroy - %s\n", dlerror());
239 item->adaptor.sys_event = (adaptor_system_event_t)dlsym(item->handle, "livebox_system_event");
240 if (!item->adaptor.sys_event)
241 ErrPrint("symbol: lievbox_system_event - %s\n", dlerror());
243 item->adaptor.is_pinned_up = (adaptor_is_pinned_up_t)dlsym(item->handle, "livebox_is_pinned_up");
244 if (!item->adaptor.is_pinned_up)
245 ErrPrint("symbol: livebox_is_pinned_up - %s\n", dlerror());
247 if (item->adaptor.initialize) {
249 fault_mark_call(pkgname, "initialize", __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
250 ret = item->adaptor.initialize(pkgname);
251 fault_unmark_call(pkgname, "initialize", __func__, USE_ALARM);
253 ErrPrint("Failed to initialize package %s\n", pkgname);
254 heap_monitor_del_target(item->so_fname);
255 delete_livebox(item);
260 s_info.livebox_list = eina_list_append(s_info.livebox_list, item);
264 static struct so_item *new_livebox(const char *pkgname)
266 struct so_item *item;
268 item = calloc(1, sizeof(*item));
270 ErrPrint("Memory: %s\n", strerror(errno));
274 item->pkgname = strdup(pkgname);
275 if (!item->pkgname) {
276 ErrPrint("Memory: %s\n", strerror(errno));
286 * item->has_livbox_script
289 item->inst_list = NULL;
291 item->so_fname = so_path_alloc(pkgname);
292 if (!item->so_fname) {
298 fault_mark_call(pkgname, __func__, __func__, USE_ALARM, DEFAULT_LOAD_TIMER);
299 item->handle = dlopen(item->so_fname, RTLD_LOCAL | RTLD_NOW | RTLD_DEEPBIND);
301 fault_unmark_call(pkgname, __func__, __func__, USE_ALARM);
302 ErrPrint("dlopen: %s - %s\n", dlerror(), item->so_fname);
303 free(item->so_fname);
308 fault_unmark_call(pkgname, __func__, __func__, USE_ALARM);
310 item->livebox.create = (create_t)dlsym(item->handle, "livebox_create");
311 if (!item->livebox.create) {
312 ErrPrint("symbol: livebox_create - %s\n", dlerror());
313 delete_livebox(item);
317 item->livebox.destroy = (destroy_t)dlsym(item->handle, "livebox_destroy");
318 if (!item->livebox.destroy) {
319 ErrPrint("symbol: livebox_destroy - %s\n", dlerror());
320 delete_livebox(item);
324 item->livebox.pinup = (pinup_t)dlsym(item->handle, "livebox_pinup");
325 if (!item->livebox.pinup)
326 ErrPrint("symbol: livebox_pinup - %s\n", dlerror());
328 item->livebox.is_updated = (is_updated_t)dlsym(item->handle, "livebox_need_to_update");
329 if (!item->livebox.is_updated)
330 ErrPrint("symbol: livebox_need_to_update - %s\n", dlerror());
332 item->livebox.update_content = (update_content_t)dlsym(item->handle, "livebox_update_content");
333 if (!item->livebox.update_content)
334 ErrPrint("symbol: livebox_update_content - %s\n", dlerror());
336 item->livebox.clicked = (clicked_t)dlsym(item->handle, "livebox_clicked");
337 if (!item->livebox.clicked)
338 ErrPrint("symbol: livebox_clicked - %s\n", dlerror());
340 item->livebox.script_event = (script_t)dlsym(item->handle, "livebox_content_event");
341 if (!item->livebox.script_event)
342 ErrPrint("symbol: livebox_content_event - %s\n", dlerror());
344 item->livebox.resize = (resize_t)dlsym(item->handle, "livebox_resize");
345 if (!item->livebox.resize)
346 ErrPrint("symbol: livebox_resize - %s\n", dlerror());
348 item->livebox.create_needed = (create_needed_t)dlsym(item->handle, "livebox_need_to_create");
349 if (!item->livebox.create_needed)
350 ErrPrint("symbol: livebox_need_to_create - %s\n", dlerror());
352 item->livebox.change_group = (change_group_t)dlsym(item->handle, "livebox_change_group");
353 if (!item->livebox.change_group)
354 ErrPrint("symbol: livebox_change_group - %s\n", dlerror());
356 item->livebox.get_output_info = (get_output_info_t)dlsym(item->handle, "livebox_get_info");
357 if (!item->livebox.get_output_info)
358 ErrPrint("symbol: livebox_get_info - %s\n", dlerror());
360 item->livebox.initialize = (initialize_t)dlsym(item->handle, "livebox_initialize");
361 if (!item->livebox.initialize)
362 ErrPrint("symbol: livebox_initialize - %s\n", dlerror());
364 item->livebox.finalize = (finalize_t)dlsym(item->handle, "livebox_finalize");
365 if (!item->livebox.finalize)
366 ErrPrint("symbol: livebox_finalize - %s\n", dlerror());
368 item->livebox.need_to_destroy = (need_to_destroy_t)dlsym(item->handle, "livebox_need_to_destroy");
369 if (!item->livebox.need_to_destroy)
370 ErrPrint("symbol: livebox_need_to_destroy - %s\n", dlerror());
372 item->livebox.sys_event = (system_event_t)dlsym(item->handle, "livebox_system_event");
373 if (!item->livebox.sys_event)
374 ErrPrint("symbol: livebox_system_event - %s\n", dlerror());
376 item->livebox.is_pinned_up = (is_pinned_up_t)dlsym(item->handle, "livebox_is_pinned_up");
377 if (!item->livebox.is_pinned_up)
378 ErrPrint("symbol: livebox_is_pinned_up - %s\n", dlerror());
380 heap_monitor_add_target(item->so_fname);
382 if (item->livebox.initialize) {
384 fault_mark_call(pkgname, "initialize", __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
385 ret = item->livebox.initialize(pkgname);
386 fault_unmark_call(pkgname, "initialize", __func__, USE_ALARM);
388 ErrPrint("Failed to initialize package %s\n", pkgname);
389 heap_monitor_del_target(item->so_fname);
390 delete_livebox(item);
395 s_info.livebox_list = eina_list_append(s_info.livebox_list, item);
399 static inline struct instance *new_instance(const char *id, const char *content, const char *cluster, const char *category)
401 struct instance *inst;
403 inst = malloc(sizeof(*inst));
405 ErrPrint("Heap: %s\n", strerror(errno));
409 inst->id = strdup(id);
411 ErrPrint("Heap: %s\n", strerror(errno));
417 inst->content = strdup(content);
418 if (!inst->content) {
419 ErrPrint("memory: %s\n", strerror(errno));
425 inst->content = NULL;
429 inst->cluster = strdup(cluster);
430 if (!inst->cluster) {
431 ErrPrint("memory: %s\n", strerror(errno));
438 inst->cluster = NULL;
442 inst->category = strdup(category);
443 if (!inst->category) {
444 ErrPrint("memory: %s\n", strerror(errno));
452 inst->category = NULL;
463 static inline int delete_instance(struct instance *inst)
466 free(inst->category);
474 static inline struct instance *find_instance(struct so_item *item, const char *id)
476 struct instance *inst;
479 EINA_LIST_FOREACH(item->inst_list, l, inst) {
480 if (!strcmp(inst->id, id))
487 HAPI struct instance *so_find_instance(const char *pkgname, const char *id)
489 struct so_item *item;
491 item = find_livebox(pkgname);
495 return find_instance(item, id);
498 HAPI int so_create(const char *pkgname, const char *id, const char *content_info, int timeout, int has_livebox_script, const char *cluster, const char *category, const char *abi, struct instance **out)
500 struct so_item *item;
501 struct instance *inst;
504 item = find_livebox(pkgname);
506 inst = find_instance(item, id);
508 ErrPrint("Instance: %s - %s is already exists\n", pkgname, id);
512 if (!strcasecmp(abi, "c"))
513 item = new_livebox(pkgname);
515 item = new_adaptor(pkgname, abi);
520 inst = new_instance(id, content_info, cluster, category);
522 if (!item->inst_list)
523 delete_livebox(item);
528 item->inst_list = eina_list_append(item->inst_list, inst);
529 item->has_livebox_script = has_livebox_script;
530 item->timeout = timeout;
532 fault_mark_call(pkgname, id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
534 if (item->adaptor.create)
535 ret = item->adaptor.create(pkgname, util_uri_to_path(id), content_info, cluster, category);
536 else if (item->livebox.create)
537 ret = item->livebox.create(util_uri_to_path(id), content_info, cluster, category);
538 else /*! \NOTE: This is not possible, but for the exceptional handling */
541 fault_unmark_call(pkgname, id, __func__, USE_ALARM);
544 item->inst_list = eina_list_remove(item->inst_list, inst);
545 delete_instance(inst);
547 if (!item->inst_list) {
548 /* There is no instances, unload this livebox */
549 s_info.livebox_list = eina_list_remove(s_info.livebox_list, item);
550 delete_livebox(item);
560 HAPI int so_destroy(struct instance *inst)
562 struct so_item *item;
569 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
571 if (item->adaptor.destroy)
572 ret = item->adaptor.destroy(item->pkgname, util_uri_to_path(inst->id));
573 else if (item->livebox.destroy)
574 ret = item->livebox.destroy(util_uri_to_path(inst->id));
578 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
580 item->inst_list = eina_list_remove(item->inst_list, inst);
581 delete_instance(inst);
583 if (!item->inst_list) {
584 s_info.livebox_list = eina_list_remove(s_info.livebox_list, item);
585 delete_livebox(item);
591 HAPI char *so_pinup(struct instance *inst, int pinup)
593 struct so_item *item;
600 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
601 if (item->adaptor.pinup)
602 ret = item->adaptor.pinup(item->pkgname, util_uri_to_path(inst->id), pinup);
603 else if (item->livebox.pinup)
604 ret = item->livebox.pinup(util_uri_to_path(inst->id), pinup);
607 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
611 HAPI int so_is_pinned_up(struct instance *inst)
613 struct so_item *item;
620 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
621 if (item->adaptor.is_pinned_up)
622 ret = item->adaptor.is_pinned_up(item->pkgname, util_uri_to_path(inst->id));
623 else if (item->livebox.is_pinned_up)
624 ret = item->livebox.is_pinned_up(util_uri_to_path(inst->id));
627 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
631 HAPI int so_is_updated(struct instance *inst)
633 struct so_item *item;
640 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
642 if (item->adaptor.is_updated)
643 ret = item->adaptor.is_updated(item->pkgname, util_uri_to_path(inst->id));
644 else if (item->livebox.is_updated)
645 ret = item->livebox.is_updated(util_uri_to_path(inst->id));
649 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
654 HAPI int so_need_to_destroy(struct instance *inst)
656 struct so_item *item;
663 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
665 if (item->adaptor.need_to_destroy)
666 ret = item->adaptor.need_to_destroy(item->pkgname, util_uri_to_path(inst->id));
667 else if (item->livebox.need_to_destroy)
668 ret = item->livebox.need_to_destroy(util_uri_to_path(inst->id));
672 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
677 HAPI int so_update(struct instance *inst)
679 struct so_item *item;
686 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
688 if (item->adaptor.update_content)
689 ret = item->adaptor.update_content(item->pkgname, util_uri_to_path(inst->id));
690 else if (item->livebox.update_content)
691 ret = item->livebox.update_content(util_uri_to_path(inst->id));
695 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
699 HAPI int so_clicked(struct instance *inst, const char *event, double timestamp, double x, double y)
701 struct so_item *item;
708 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
710 if (item->adaptor.clicked)
711 ret = item->adaptor.clicked(item->pkgname, util_uri_to_path(inst->id), event, timestamp, x, y);
712 else if (item->livebox.clicked)
713 ret = item->livebox.clicked(util_uri_to_path(inst->id), event, timestamp, x, y);
717 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
722 HAPI int so_script_event(struct instance *inst, const char *emission, const char *source, struct event_info *event_info)
724 struct so_item *item;
731 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
733 if (item->adaptor.script_event)
734 ret = item->adaptor.script_event(item->pkgname, util_uri_to_path(inst->id), emission, source, event_info);
735 else if (item->livebox.script_event)
736 ret = item->livebox.script_event(util_uri_to_path(inst->id), emission, source, event_info);
740 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
745 HAPI int so_resize(struct instance *inst, int w, int h)
747 struct so_item *item;
755 type = livebox_service_size_type(w, h);
756 if (type == LB_SIZE_TYPE_UNKNOWN)
759 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
761 if (item->adaptor.resize)
762 ret = item->adaptor.resize(item->pkgname, util_uri_to_path(inst->id), type);
763 else if (item->livebox.resize)
764 ret = item->livebox.resize(util_uri_to_path(inst->id), type);
768 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
773 HAPI int so_create_needed(const char *pkgname, const char *cluster, const char *category, const char *abi)
775 struct so_item *item;
778 item = find_livebox(pkgname);
780 if (!strcasecmp(abi, "c"))
781 item = new_livebox(pkgname);
783 item = new_adaptor(pkgname, abi);
788 fault_mark_call(item->pkgname, __func__, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
790 if (item->adaptor.create_needed)
791 ret = item->adaptor.create_needed(pkgname, cluster, category);
792 else if (item->livebox.create_needed)
793 ret = item->livebox.create_needed(cluster, category);
797 fault_unmark_call(item->pkgname, __func__, __func__, USE_ALARM);
799 DbgPrint("[%s] returns %d\n", pkgname, ret);
803 HAPI int so_change_group(struct instance *inst, const char *cluster, const char *category)
805 struct so_item *item;
814 tmp_cluster = strdup(cluster);
818 tmp_category = strdup(category);
824 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
826 if (item->adaptor.change_group)
827 ret = item->adaptor.change_group(item->pkgname, util_uri_to_path(inst->id), cluster, category);
828 else if (item->livebox.change_group)
829 ret = item->livebox.change_group(util_uri_to_path(inst->id), cluster, category);
833 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
836 free(inst->category);
838 inst->cluster = tmp_cluster;
839 inst->category = tmp_category;
848 HAPI int so_get_output_info(struct instance *inst, int *w, int *h, double *priority, char **content, char **title)
850 struct so_item *item;
860 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
862 if (item->adaptor.get_output_info)
863 ret = item->adaptor.get_output_info(item->pkgname, util_uri_to_path(inst->id), w, h, priority, content, title);
864 else if (item->livebox.get_output_info)
865 ret = item->livebox.get_output_info(util_uri_to_path(inst->id), w, h, priority, content, title);
869 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);
873 inst->priority = *priority;
877 * Add "*content" "*title" address validation code.
883 inst->content = *content;
888 inst->title = *title;
892 if (main_heap_monitor_is_enabled())
893 DbgPrint("%s allocates %d bytes\n", item->pkgname, heap_monitor_target_usage(item->so_fname));
898 HAPI int so_sys_event(struct instance *inst, int event)
900 struct so_item *item;
907 fault_mark_call(item->pkgname, inst->id, __func__, USE_ALARM, DEFAULT_LIFE_TIMER);
908 if (item->adaptor.sys_event)
909 ret = item->adaptor.sys_event(item->pkgname, util_uri_to_path(inst->id), event);
910 else if (item->livebox.sys_event)
911 ret = item->livebox.sys_event(util_uri_to_path(inst->id), event);
915 fault_unmark_call(item->pkgname, inst->id, __func__, USE_ALARM);