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

Commit 5c8e73a2 authored by Sreelakshmi Gownipalli's avatar Sreelakshmi Gownipalli Committed by Gerrit - the friendly Code Review server
Browse files

diag: In diag_socket_read continue reads when ctrl port pkt arrives



In diag_socket_read continue reading the data when ctrl port message
comes until data_ready becomes zero.

Change-Id: Iaa658cb8e7836824bb8aaccbbc2adcc4600129a4
Signed-off-by: default avatarSreelakshmi Gownipalli <sgownipa@codeaurora.org>
parent 0ba27bd6
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -683,12 +683,8 @@ static int diag_socket_read(void *ctxt, unsigned char *buf, int buf_len)
		} else if (read_len <= 0)
			goto fail;

		if (src_addr.sq_port == QRTR_PORT_CTRL) {
			mutex_lock(channel_mutex);
			diagfwd_channel_read_done(info->fwd_ctxt, buf, 0);
			mutex_unlock(channel_mutex);
			return 0;
		}
		if (src_addr.sq_port == QRTR_PORT_CTRL)
			continue;

		if (!atomic_read(&info->opened) &&
		    info->port_type == PORT_TYPE_SERVER) {