diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-12-20 23:42:55 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-12-20 23:42:55 +0100 |
commit | 6a8436419d1b77b24d82bd90354adc4baa393566 (patch) | |
tree | d20e17b148f37dc299658a60303e6a2e4e6ce63f /net/rose/af_rose.c | |
parent | 55fa518867978e1f5fd8353098f80d125ac734d7 (diff) | |
parent | ff75427a7f641c4468610fbda2ccb69218174cd1 (diff) |
Merge branch 'topic/ca0106-capture-no-44khz' into topic/ca0106
Diffstat (limited to 'net/rose/af_rose.c')
-rw-r--r-- | net/rose/af_rose.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index a7f1ce11bc2..0c1cc761280 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -1072,6 +1072,10 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock, unsigned char *asmptr; int n, size, qbit = 0; + /* ROSE empty frame has no meaning : don't send */ + if (len == 0) + return 0; + if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT)) return -EINVAL; @@ -1265,6 +1269,12 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock, skb_reset_transport_header(skb); copied = skb->len; + /* ROSE empty frame has no meaning : ignore it */ + if (copied == 0) { + skb_free_datagram(sk, skb); + return copied; + } + if (copied > size) { copied = size; msg->msg_flags |= MSG_TRUNC; |