mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
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:
parent
3ddd3c6ec2
commit
a51b58c8e7
1 changed files with 6 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue