From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> Checks that ipc is connected --- android/ipc.c | 5 +++++ android/ipc.h | 1 + 2 files changed, 6 insertions(+) diff --git a/android/ipc.c b/android/ipc.c index 2e67428..3504143 100644 --- a/android/ipc.c +++ b/android/ipc.c @@ -292,6 +292,11 @@ static gboolean cmd_connect_cb(GIOChannel *io, GIOCondition cond, return FALSE; } +bool ipc_is_connected(struct ipc *ipc) +{ + return ipc->cmd_watch; +} + struct ipc *ipc_init(const char *path, size_t size, int max_service_id, bool notifications, ipc_disconnect_cb cb, void *cb_data) diff --git a/android/ipc.h b/android/ipc.h index fd2b985..0eef515 100644 --- a/android/ipc.h +++ b/android/ipc.h @@ -31,6 +31,7 @@ struct ipc; typedef void (*ipc_disconnect_cb) (void *data); +bool ipc_is_connected(struct ipc *ipc); struct ipc *ipc_init(const char *path, size_t size, int max_service_id, bool notifications, ipc_disconnect_cb cb, void *cb_data); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html