rpdfs-progs: Insert peer socket during net_connect()
PATCH 1/1 rpdfs-progs: Insert peer socket during net_connect()
Attempts to send following a successful net_connect() were failing because the peer socket was missing from the global table.
Signed-off-by Chris Kirby <[email protected]>
--- utask/net.c | 4 ++++ 1 file changed, 4 insertions(+)
utask/net.c +4 -0
@@ -596,6 +596,7 @@ int net_connect(struct sockaddr_in *addr) {struct net_instance *inst = &global_net_inst;struct net_socket *sock; +struct net_socket *found;int fd =-1 ;int ret;
@@ -619,6 +620,9 @@ int net_connect(struct sockaddr_in *addr) sock->fd = fd; fd =-1 ; + found =get_peer_sock (inst, addr, sock); +BUG_ON (found != sock);/* XXX don't yet support racing reconnect */ + ret =utask_create (send_utask, sock, &sock->send_tsk) ?:utask_create (recv_utask, sock, &sock->recv_tsk);if (ret <0 )
Signature · 1 line
2.53.0
Zach Brown
AppliedQuoted 3 lines · Chris Kirby
Attempts to send following a successful
net_connect()were failing because the peer socket was missing from the global table.
Applied, thanks!
- z