Marcel Holtmann
cde69653e0
android: Update copyright and license details
2014-02-11 10:42:56 -08:00
Marcin Kraglak
e648a5bd68
android/ipc: Remove watches on cleanup
...
Remove watches on cleanup. It will avoid receiving
events after cleanup.
2014-02-03 14:15:00 +01:00
Marcel Holtmann
c1add0ff9f
android: Use src/log.h include instead of just log.h
2014-01-26 00:23:15 -08:00
Luiz Augusto von Dentz
732b97d209
android/ipc: Leave the connect callback to handle errors
...
It is not necessary to check connect errors since there is a watch
created for that.
2014-01-21 16:20:54 +01:00
Luiz Augusto von Dentz
c26f5203fd
android/A2DP: Add retry logic to Audio IPC
...
In case the audio HAL disconnects without cleaning up its endpoints treat
it as unclean disconnection and attempt to reconnect.
2014-01-21 16:20:54 +01:00
Andrzej Kaczmarek
bee4fe3c78
android/ipc: Use proper handlers in ipc_handle_msg
...
ipc_handle_msg() should use handlers passed as function parameter
instead of static one as otherwise Audio IPC will use incorrect
handlers.
2014-01-13 08:57:49 +01:00
Andrzej Kaczmarek
84a8ca8d81
android/ipc: Fix arguments order in DBG
2014-01-13 08:57:49 +01:00
Luiz Augusto von Dentz
193cbd4dd3
android/ipc: Add audio_ipc_send_rsp and audio_ipc_send_rsp_full
...
These functions can be used to respond to commands recieved over audio
IPC.
2014-01-07 13:37:53 +02:00
Luiz Augusto von Dentz
1829216bab
android/ipc: Add message handling for audio IPC
...
This adds audio_ipc_register and audio_ipc_unregister and adapt
ipc_handle_msg to be able to handle audio services messages.
2014-01-07 13:37:53 +02:00
Luiz Augusto von Dentz
294bfb1001
android/ipc: Add initial code for audio IPC
...
This add initial code for listen and accept connections on the abstract
socket defined for the audio IPC.
2014-01-07 13:37:50 +02:00
Lukasz Rymanowski
aed795faa3
android/ipc: Remove not needed include
2013-12-30 14:23:42 +02:00
Szymon Janc
17c9c2073a
android: Fix missing failure check in ipc_init
...
If connecting command socket failed daemon should be terminated.
2013-12-09 11:34:10 +02:00
Szymon Janc
566bae35fc
android: Move sockets handling from main to IPC code
...
This moves IO handling to IPC code making it fully responsible for
creating and veryfing IPC messages exchange.
2013-12-03 13:44:04 +02:00
Szymon Janc
454cdd7a72
android: Add initial code for IPC message handlers
...
This will allow to register and unregister handlers for IPC messages
Basic sanity check will be done in common code. Commands with variable
length will be verified against minimum size only.
2013-12-02 16:24:01 +02:00
Szymon Janc
3b7b97bb5f
android: Make ipc_send static
...
It should not longer be used from outside of IPC code.
2013-11-28 18:02:27 +02:00
Szymon Janc
d4199a012d
android: Add ipc_send_rsp_full IPC helper
...
This will be used to send non-empty reply using command socket.
2013-11-28 18:02:27 +02:00
Szymon Janc
066eac37ad
android: Add IPC helper for sending notifications
...
This will use notification socket passed on IPC init.
2013-11-28 18:02:26 +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
Szymon Janc
4f1d080aa7
android: Initialize IPC with command and notification sockets
...
Pass sockets after succesfully connected to HAL. This will allow
to improve IPC helpers API.
2013-11-28 18:02:26 +02:00
Andrei Emeltchenko
e73bd888be
android/ipc: Zero initialize cmsg buffer
...
This fixes valgrind warnings:
...
Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s)
...
2013-11-21 16:43:38 +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
Andrei Emeltchenko
79e90ad1b5
android/ipc: Fix crash when sending file descriptor
...
Since CMSG_FIRSTHDR is defined as shown below:
((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
it return NULL if msg_controllen is not defined. Accessing
that pointer result in daemon crash.
2013-11-08 11:00:49 +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
d661ba725c
android: Add the missing HAVE_CONFIG_H check daemon files
2013-11-04 12:10:31 +02:00
Luiz Augusto von Dentz
d52939fde9
android: Rename ipc_send_error to ipc_send_rsp
2013-10-25 15:22:24 +03:00
Luiz Augusto von Dentz
1610f70cd6
android: Rename ERROR enum and command to STATUS
...
This is more consistent with HAL interface which does name the enum as
bt_status_t and does use BT_STATUS prefix.
2013-10-25 15:13:48 +03:00
Luiz Augusto von Dentz
55a25cb83c
android/hal-msg: Reduce length of defines and struct names
...
The current defines and struct names are way too big and sometimes
incosistent.
2013-10-24 10:46:24 +03:00
Szymon Janc
16265b9916
android: Add IPC helper for convenient error sending
...
This simple helper will simplify error paths in code.
2013-10-21 22:48:50 +03:00
Szymon Janc
4e4307e2a8
android: Add IPC helper for sending command responses and notification
...
If send failed mainloop is stopped.
2013-10-21 22:48:03 +03:00