This will allow to print proper error before exiting. --- android/hal-ipc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/hal-ipc.c b/android/hal-ipc.c index 5d622e1..b19704a 100644 --- a/android/hal-ipc.c +++ b/android/hal-ipc.c @@ -356,6 +356,12 @@ int hal_ipc_cmd(uint8_t service_id, uint8_t opcode, uint16_t len, void *param, exit(EXIT_FAILURE); } + /* socket was shutdown */ + if (ret == 0) { + error("Command socket closed, aborting"); + exit(EXIT_FAILURE); + } + memset(&msg, 0, sizeof(msg)); memset(&cmd, 0, sizeof(cmd)); -- 1.8.4.3 -- 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