Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184224
b: refs/heads/master
c: 28a1dbb
h: refs/heads/master
v: v3
  • Loading branch information
Jan Kiszka authored and David S. Miller committed Feb 17, 2010
1 parent 39e5e77 commit 3fbb882
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54f0fad3d8414cf770c1cf25a1d98fcaec899b5a
refs/heads/master: 28a1dbb6f7feade304f43798feb15f6978516624
19 changes: 7 additions & 12 deletions trunk/drivers/isdn/capi/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,24 +657,19 @@ capi_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
struct capidev *cdev = (struct capidev *)file->private_data;
struct sk_buff *skb;
size_t copied;
int err;

if (!cdev->ap.applid)
return -ENODEV;

if ((skb = skb_dequeue(&cdev->recvqueue)) == NULL) {

skb = skb_dequeue(&cdev->recvqueue);
if (!skb) {
if (file->f_flags & O_NONBLOCK)
return -EAGAIN;

for (;;) {
interruptible_sleep_on(&cdev->recvwait);
if ((skb = skb_dequeue(&cdev->recvqueue)) != NULL)
break;
if (signal_pending(current))
break;
}
if (skb == NULL)
return -ERESTARTNOHAND;
err = wait_event_interruptible(cdev->recvwait,
(skb = skb_dequeue(&cdev->recvqueue)));
if (err)
return err;
}
if (skb->len > count) {
skb_queue_head(&cdev->recvqueue, skb);
Expand Down

0 comments on commit 3fbb882

Please sign in to comment.