If the return value of aul_sock_recv_reply_pkt() is a negative error value,
the function should return the error value after calling aul_error_convert()
with the return value.
Previous implemenation uses the fd variable. It's a wrong implementation.
This patch uses the ret variable when calling aul_error_convert().
Change-Id: Ic054b9d697f9f6502608af88a4ebeed3ae69f138
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
ret = aul_sock_recv_reply_pkt(fd, &pkt);
if (ret < 0 || pkt == NULL) {
_E("Failed to get reply. error(%d)", ret);
- return aul_error_convert(fd);
+ return aul_error_convert(ret);
}
if (pkt->cmd != APP_GET_INFO_OK) {