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

Commit a51b58c8 authored by Jay Jayanna's avatar Jay Jayanna
Browse files

net: qrtr: Fix early exit in del client and bye cmds



When del client and bye command packets are sent out, if there
is an error in sending, continue with the loop to send to the
rest of the clients. The current implementation bails out when
the send fails. This is causing dropping of these packets to
the rest of the clients.

Change-Id: If9111216061e64ba1777590edba128b011625250
Signed-off-by: default avatarJay Jayanna <jayanna@codeaurora.org>
parent 3ddd3c6e
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -375,10 +375,9 @@ static int ctrl_cmd_bye(struct sockaddr_qrtr *from)
		msg.msg_namelen = sizeof(sq);

		ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt));
		if (ret < 0 && ret != -ENODEV) {
			pr_err("failed to send bye cmd %d\n", ret);
			return ret;
		}
		if (ret < 0 && ret != -ENODEV)
			pr_err("send bye failed: [0x%x:0x%x] 0x%x ret: %d\n",
			       srv->service, srv->instance, srv->port, ret);
	}

	return 0;
@@ -450,10 +449,9 @@ static int ctrl_cmd_del_client(struct sockaddr_qrtr *from,
		msg.msg_namelen = sizeof(sq);

		ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt));
		if (ret < 0 && ret != -ENODEV) {
			pr_err("failed to send del client cmd %d\n", ret);
			return ret;
		}
		if (ret < 0 && ret != -ENODEV)
			pr_err("del client cmd failed: [0x%x:0x%x] 0x%x %d\n",
			       srv->service, srv->instance, srv->port, ret);
	}

	return 0;