if (new_info)
__add_resultcb(new_info);
- if (info->caller_cb)
+ if (info->caller_cb) {
info->caller_cb(launched_pid, info->caller_data);
+ info->caller_cb = NULL;
+ }
- __remove_resultcb(info);
- __destroy_resultcb(info);
+ if (!info->error_cb) {
+ __remove_resultcb(info);
+ __destroy_resultcb(info);
+ }
_D("change callback, fwd pid: %d", launched_pid);
}
info->reply_cb(kb, is_cancel, info->user_data);
- __remove_resultcb(info);
- __destroy_resultcb(info);
+ info->reply_cb = NULL;
+
+ if (!info->error_cb) {
+ __remove_resultcb(info);
+ __destroy_resultcb(info);
+ }
end:
return 0;
while (iter) {
info = (app_resultcb_info_t *)iter->data;
iter = g_list_next(iter);
- if (info->launched_pid == pid) {
+ if (info->launched_pid == pid && !info->error_cb) {
__resultcb_list = g_list_remove(
__resultcb_list, info);
__destroy_resultcb(info);
/* find corresponding callback */
cb_info = (aul_svc_cb_info_t*)data;
- cb_info->cb_func(b, cb_info->request_code,
- (aul_svc_result_val)res, cb_info->data);
- __remove_rescb(cb_info);
+ if (cb_info->cb_func) {
+ cb_info->cb_func(b, cb_info->request_code,
+ (aul_svc_result_val)res, cb_info->data);
+ cb_info->cb_func = NULL;
+ }
- return;
+ if (cb_info->err_cb)
+ return;
+
+ __remove_rescb(cb_info);
}
static int __error_convert(int res)
cb_info->err_cb(cb_info->request_code, err, cb_info->data);
cb_info->err_cb = NULL;
}
+
+ if (cb_info->cb_func)
+ return;
+
+ __remove_rescb(cb_info);
}
static int __run_svc_with_pkgname(char *pkgname, bundle *b, int request_code,