Re: [PATCH] android: Fix missing failure check in ipc_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> If connecting command socket failed daemon should be terminated.
> ---
>  android/ipc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/android/ipc.c b/android/ipc.c
> index 1d369a8..6f940cd 100644
> --- a/android/ipc.c
> +++ b/android/ipc.c
> @@ -229,6 +229,8 @@ static gboolean cmd_connect_cb(GIOChannel *io, GIOCondition cond,
>  void ipc_init(void)
>  {
>  	cmd_io = connect_hal(cmd_connect_cb);
> +	if (!cmd_io)
> +		raise(SIGTERM);
>  }
>  
>  void ipc_cleanup(void)
> 

ping
--
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




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux