Commit Graph

14 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
d48132c844 android/pan: Fix sending uninitialised bytes
name field of struct hal_ev_pan_ctrl_state is 17 bytes longs so memcpy of
the interface name does not field all the those bytes leaving the last
uninitialised:
Syscall param sendmsg(msg.msg_iov[1]) points to uninitialised byte(s)
   at 0x3600EF6E20: __sendmsg_nocancel (in /usr/lib64/libc-2.17.so)
   by 0x40DC06: ipc_send (ipc.c:93)
   by 0x4149AC: bnep_conn_cb (pan.c:120)
   by 0x4192B8: bnep_setup_cb (bnep.c:324)
   by 0x31D1647DF5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x31D1648147: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x31D1648549: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x40338B: main (main.c:629)
 Address 0x7ff0003d3 is on thread 1's stack
2013-11-29 17:10:19 +02:00
Ravi kumar Veeramally
cd57b8b7e0 android/pan: Implement the get local role method in daemon
Returns local role of the device (NONE, PANU or NAP).
2013-11-29 17:10:19 +02:00
Ravi kumar Veeramally
ba10ece248 android/pan: Implement pan disconnect method in daemon
Disconnect ongoing PANU role connection betweek devices, free
the device and notify the connection state.
2013-11-29 17:10:19 +02:00
Ravi kumar Veeramally
64b76dd6ae android/pan: Implement pan connect method in daemon
Implements the PAN connect method in android daemon with PANU role
only. Setting up the bnep environment, adds connection and makes
bnep interface up are part of bnep_connect call. Notifies bnep
interface on control state call back and connection status on
connection state call back.
2013-11-29 17:10:19 +02:00
Szymon Janc
7624ea2d42 android: Don't pass notification socket on services register
It is no longer needed as proper socket is use by IPC helpers.
2013-11-28 18:02:27 +02:00
Szymon Janc
6456e15664 android: Remove socket parameter from ipc_send_rsp
Use command socket provided to IPC on init.
2013-11-28 18:02:26 +02:00
Ravi kumar Veeramally
b32461d42d android: Handle multiple init(register) and cleanup(unregister) calls properly
This can be tested with haltest.
2013-11-19 18:15:37 +02:00
Ravi kumar Veeramally
0a5ae04d8e android/pan: Fix wrong struct parameter in disconnect function call 2013-11-19 15:23:20 +02:00
Szymon Janc
fc10c55498 android: Improve IPC helper to not send invalid status response
This fix issue with sending invalid success response from several
places where ipc_send_rsp was used for reporting success. Instead of
using using ipc_send for success response, make helper handle that.
2013-11-18 15:17:22 +02:00
Ravi kumar Veeramally
017aa01531 android/pan: Fix wrong HAL service id 2013-11-15 12:02:36 +02:00
Szymon Janc
052e481adc android: Pass notification socket fd to service handlers
IPC helpers were converted to accept socket, not GIOChannel so there
is no need of passing former to handlers.
2013-11-07 17:05:47 +02:00
Szymon Janc
32f29761bf android: Make IPC helpers accept file descriptor
There is no need to pass GIOChannel as writes are done immediately.
2013-11-07 17:05:07 +02:00
Luiz Augusto von Dentz
1ca4c658d9 android/pan: Add initial code for handling commands 2013-11-04 21:13:05 +02:00
Luiz Augusto von Dentz
8e955dfd82 android: Add initial skeleton for pan in the daemon 2013-11-04 21:12:40 +02:00