diff options
| author | Dmitry Torokhov <dtor@insightbb.com> | 2006-11-04 22:42:39 -0500 | 
|---|---|---|
| committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-11-04 22:42:39 -0500 | 
| commit | 752c58a471c108d64da1676b2925dfbd83eb177e (patch) | |
| tree | fbffa0d7c54cd812950dffc16d642c9d449f4faf /net/tipc/socket.c | |
| parent | e52b29c2a637f6854d71a45646d7283d984a6dad (diff) | |
| parent | 10b1fbdb0a0ca91847a534ad26d0bc250c25b74f (diff) | |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'net/tipc/socket.c')
| -rw-r--r-- | net/tipc/socket.c | 13 | 
1 files changed, 10 insertions, 3 deletions
| diff --git a/net/tipc/socket.c b/net/tipc/socket.c index acfb852e7c9..2a6a5a6b4c1 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2,7 +2,7 @@   * net/tipc/socket.c: TIPC socket API   *    * Copyright (c) 2001-2006, Ericsson AB - * Copyright (c) 2004-2005, Wind River Systems + * Copyright (c) 2004-2006, Wind River Systems   * All rights reserved.   *   * Redistribution and use in source and binary forms, with or without @@ -629,6 +629,9 @@ static int send_stream(struct kiocb *iocb, struct socket *sock,                          return -ENOTCONN;          } +	if (unlikely(m->msg_name)) +		return -EISCONN; +  	/*   	 * Send each iovec entry using one or more messages  	 * @@ -641,6 +644,8 @@ static int send_stream(struct kiocb *iocb, struct socket *sock,  	curr_iovlen = m->msg_iovlen;  	my_msg.msg_iov = &my_iov;  	my_msg.msg_iovlen = 1; +	my_msg.msg_flags = m->msg_flags; +	my_msg.msg_name = NULL;  	bytes_sent = 0;  	while (curr_iovlen--) { @@ -1203,7 +1208,8 @@ static u32 dispatch(struct tipc_port *tport, struct sk_buff *buf)  	atomic_inc(&tipc_queue_size);  	skb_queue_tail(&sock->sk->sk_receive_queue, buf); -        wake_up_interruptible(sock->sk->sk_sleep); +	if (waitqueue_active(sock->sk->sk_sleep)) +		wake_up_interruptible(sock->sk->sk_sleep);  	return TIPC_OK;  } @@ -1218,7 +1224,8 @@ static void wakeupdispatch(struct tipc_port *tport)  {  	struct tipc_sock *tsock = (struct tipc_sock *)tport->usr_handle; -        wake_up_interruptible(tsock->sk.sk_sleep); +	if (waitqueue_active(tsock->sk.sk_sleep)) +		wake_up_interruptible(tsock->sk.sk_sleep);  }  /** | 
