diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2016-03-15 16:40:30 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2016-03-15 16:40:30 +0900 |
commit | e7c9fe3404ecdbdb4fed4f70e2518dc7aada7642 (patch) | |
tree | 551933a5e02040153704ddad2379143c7ef233c8 | |
parent | 972327ed164471783af1aa7a50641f6f563699e1 (diff) | |
download | aul-1-e7c9fe3404ecdbdb4fed4f70e2518dc7aada7642.tar.gz aul-1-e7c9fe3404ecdbdb4fed4f70e2518dc7aada7642.tar.bz2 aul-1-e7c9fe3404ecdbdb4fed4f70e2518dc7aada7642.zip |
Fix bug about fd passing featuresubmit/tizen_common/20160316.154911submit/tizen/20160315.075726accepted/tizen/wearable/20160315.123830accepted/tizen/tv/20160315.123649accepted/tizen/mobile/20160315.123622accepted/tizen/ivi/20160315.123737
Change-Id: Ibbcf8dc569c182972da986ec6203c8d090daeb42
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | src/aul_sock.c | 2 | ||||
-rw-r--r-- | src/launch.c | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/aul_sock.c b/src/aul_sock.c index 29c37348..f5637efa 100644 --- a/src/aul_sock.c +++ b/src/aul_sock.c @@ -582,7 +582,7 @@ static int __recv_message(int sock, struct iovec *vec, int vec_max_size, int *ve } } - return ret; + return 0; } int aul_sock_recv_reply_sock_fd(int fd, int *ret_fd, int fd_size) diff --git a/src/launch.c b/src/launch.c index eb34f6fc..d174c2c2 100644 --- a/src/launch.c +++ b/src/launch.c @@ -558,19 +558,17 @@ API int aul_request_data_control_socket_pair(bundle *kb, int *fd) if (!fd) return AUL_R_EINVAL; - if (b) + if (b) { __clear_internal_key(b); - else { + } else { b = bundle_create(); if (!b) return AUL_R_ERROR; } ret = aul_sock_send_bundle(AUL_UTIL_PID, getuid(), APP_GET_DC_SOCKET_PAIR, b, AUL_SOCK_ASYNC); - if (ret) { ret = aul_sock_recv_reply_sock_fd(ret, fds, 1); - if (ret == 0) fd[0] = fds[0]; } @@ -589,8 +587,8 @@ API int aul_request_message_port_socket_pair(int *fd) if (!fd) return AUL_R_EINVAL; - ret = aul_sock_send_bundle(AUL_UTIL_PID, getuid(), - APP_GET_MP_SOCKET_PAIR, NULL, AUL_SOCK_ASYNC); + ret = aul_sock_send_raw(AUL_UTIL_PID, getuid(), + APP_GET_MP_SOCKET_PAIR, NULL, 0, AUL_SOCK_ASYNC); if (ret) { ret = aul_sock_recv_reply_sock_fd(ret, fds, 2); if (ret == 0) { |