Skip to content

Commit

Permalink
[TIPC]: Implied connect now saves dest name for retrieval as ancillar…
Browse files Browse the repository at this point in the history
…y data.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Allan Stephens authored and David S. Miller committed Jun 26, 2006
1 parent 6b384de commit 3388007
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ static int send_msg(struct kiocb *iocb, struct socket *sock,
if ((tsock->p->published) ||
((sock->type == SOCK_STREAM) && (total_len != 0)))
return -EOPNOTSUPP;
if (dest->addrtype == TIPC_ADDR_NAME) {
tsock->p->conn_type = dest->addr.name.name.type;
tsock->p->conn_instance = dest->addr.name.name.instance;
}
}

if (down_interruptible(&tsock->sem))
Expand Down Expand Up @@ -1269,10 +1273,6 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
msg = buf_msg(buf);
res = auto_connect(sock, tsock, msg);
if (!res) {
if (dst->addrtype == TIPC_ADDR_NAME) {
tsock->p->conn_type = dst->addr.name.name.type;
tsock->p->conn_instance = dst->addr.name.name.instance;
}
if (!msg_data_sz(msg))
advance_queue(tsock);
}
Expand Down

0 comments on commit 3388007

Please sign in to comment.