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: Jay Jayanna <jayanna@codeaurora.org>
This commit is contained in:
Jay Jayanna 2020-06-17 14:29:36 -07:00
commit a51b58c8e7

View file

@ -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;