Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6e8a073 authored by Hardik Arya's avatar Hardik Arya
Browse files

diag: Close cmd socket after receiving remove channel



Closing of the cmd socket channel after receiving remove channel
from IPC router is dependent on restart notifier, which can cause
not closing cmd channel client when peripheral is up and channel
will keep using the old server address. The patch closes the
command channel after receiving notification from IPC router
without checking status of peripheral.

Change-Id: I0ce99550d2505731a1659ae57c6c4a166cd5cb48
Signed-off-by: default avatarHardik Arya <harya@codeaurora.org>
parent fc7564bb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -496,7 +496,8 @@ static void __socket_close_channel(struct diag_socket_info *info)
	if (!atomic_read(&info->opened))
		return;

	if (bootup_req[info->peripheral] == PEPIPHERAL_SSR_UP) {
	if ((bootup_req[info->peripheral] == PEPIPHERAL_SSR_UP) &&
		(info->port_type == PORT_TYPE_SERVER)) {
		DIAG_LOG(DIAG_DEBUG_PERIPHERALS,
		"diag: %s is up, stopping cleanup: bootup_req = %d\n",
		info->name, (int)bootup_req[info->peripheral]);