|
@@ -1065,7 +1065,9 @@ restart:
|
|
/* Loop around if more data is required */
|
|
/* Loop around if more data is required */
|
|
|
|
|
|
if ((sz_copied < buf_len) /* didn't get all requested data */
|
|
if ((sz_copied < buf_len) /* didn't get all requested data */
|
|
- && (flags & MSG_WAITALL) /* ... and need to wait for more */
|
|
|
|
|
|
+ && (!skb_queue_empty(&sock->sk->sk_receive_queue) ||
|
|
|
|
+ (flags & MSG_WAITALL))
|
|
|
|
+ /* ... and more is ready or required */
|
|
&& (!(flags & MSG_PEEK)) /* ... and aren't just peeking at data */
|
|
&& (!(flags & MSG_PEEK)) /* ... and aren't just peeking at data */
|
|
&& (!err) /* ... and haven't reached a FIN */
|
|
&& (!err) /* ... and haven't reached a FIN */
|
|
)
|
|
)
|