static gboolean __dispatch_request(gpointer data)
{
struct aul_request_s *req = (struct aul_request_s *)data;
+ int ret;
if (!__context.initialized) {
_W("Ignore request(%d)", req->cmd);
}
aul_worker_remove_anr_timer(__context.worker);
+
+ if (req->cmd != WIDGET_GET_CONTENT && req->clifd > 0) {
+ ret = aul_sock_send_result(req->clifd, 0);
+ if (ret < 0) {
+ _E("Failed to send result. cmd(%s:%d)",
+ aul_cmd_convert_to_string(req->cmd),
+ req->cmd);
+ __destroy_request(req);
+ return G_SOURCE_REMOVE;
+ }
+
+ req->clifd = -1;
+ }
+
if (req->cmd >= APP_START && req->cmd < ARRAY_SIZE(__dispatcher) &&
__dispatcher[req->cmd]) {
_W("Command(%s:%d)",
bundle *b = NULL;
int clifd;
struct ucred cr;
- int ret;
pkt = aul_sock_recv_pkt(fd, &clifd, &cr);
if (!pkt) {
if (pkt->opt & AUL_SOCK_NOREPLY) {
close(clifd);
clifd = -1;
- } else {
- ret = aul_sock_send_result(clifd, 0);
- if (ret < 0) {
- _E("Failed to send result. cmd(%s:%d)",
- aul_cmd_convert_to_string(pkt->cmd),
- pkt->cmd);
- free(pkt);
- return true;
- }
- clifd = -1;
}
}