rtdmnet.c : Fixed rt/nrt invertion for both sendmsg and recvmsg... m(
--- a/devices/rtdmnet.c Fri Oct 05 18:01:39 2018 +0200
+++ b/devices/rtdmnet.c Fri Oct 05 23:47:07 2018 +0200
@@ -351,9 +351,9 @@
msg.msg_iovlen = 1;
if (rtdm_in_rt_context())
+ ret = rtdm_sendmsg(dev->socket, &msg, 0);
+ else
ret = nrt_rtdm_sendmsg(dev->socket, &msg);
- else
- ret = rtdm_sendmsg(dev->socket, &msg, 0);
return ret == len ? NETDEV_TX_OK : NETDEV_TX_BUSY;
}
@@ -407,9 +407,9 @@
msg.msg_iovlen = 1;
if (rtdm_in_rt_context())
+ ret = rtdm_recvmsg(dev->socket, &msg, MSG_DONTWAIT);
+ else
ret = nrt_rtdm_recvmsg(dev->socket, &msg);
- else
- ret = rtdm_recvmsg(dev->socket, &msg, MSG_DONTWAIT);
if (ret > 0) {
ecdev_receive(dev->ecdev, dev->rx_buf, ret);