From: Zebediah Figura zfigura@codeweavers.com
--- server/sock.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/server/sock.c b/server/sock.c index 9f872c65637..5a4240e78f4 100644 --- a/server/sock.c +++ b/server/sock.c @@ -187,7 +187,6 @@ struct sock * both pending_events and reported_events (as we should only ever report * any event once until it is reset.) */ unsigned int reported_events; - unsigned int flags; /* socket flags */ unsigned short proto; /* socket protocol */ unsigned short type; /* socket type */ unsigned short family; /* socket family */ @@ -1479,7 +1478,6 @@ static struct sock *create_socket(void) sock->mask = 0; sock->pending_events = 0; sock->reported_events = 0; - sock->flags = 0; sock->proto = 0; sock->type = 0; sock->family = 0; @@ -1594,7 +1592,7 @@ static void set_dont_fragment( int fd, int level, int value ) setsockopt( fd, level, optname, &value, sizeof(value) ); }
-static int init_socket( struct sock *sock, int family, int type, int protocol, unsigned int flags ) +static int init_socket( struct sock *sock, int family, int type, int protocol ) { unsigned int options = 0; int sockfd, unix_type, unix_family, unix_protocol, value; @@ -1673,7 +1671,6 @@ static int init_socket( struct sock *sock, int family, int type, int protocol, u sock->sndbuf = value;
sock->state = (type == WS_SOCK_STREAM ? SOCK_UNCONNECTED : SOCK_CONNECTIONLESS); - sock->flags = flags; sock->proto = protocol; sock->type = type; sock->family = family; @@ -1751,7 +1748,6 @@ static struct sock *accept_socket( struct sock *sock ) acceptsock->message = sock->message; acceptsock->connect_time = current_time; if (sock->event) acceptsock->event = (struct event *)grab_object( sock->event ); - acceptsock->flags = sock->flags; if (!(acceptsock->fd = create_anonymous_fd( &sock_fd_ops, acceptfd, &acceptsock->obj, get_fd_options( sock->fd ) ))) { @@ -2159,7 +2155,7 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) set_error( STATUS_INVALID_PARAMETER ); return; } - init_socket( sock, params->family, params->type, params->protocol, params->flags ); + init_socket( sock, params->family, params->type, params->protocol ); return; }
From: Zebediah Figura zfigura@codeweavers.com
It's already set previously in sock_poll_event(). Moreover, complete_async_connect() will not always be called. --- server/sock.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/server/sock.c b/server/sock.c index 5a4240e78f4..60b03c13bba 100644 --- a/server/sock.c +++ b/server/sock.c @@ -806,8 +806,6 @@ static void complete_async_connect( struct sock *sock )
if (debug_level) fprintf( stderr, "completing connect request for socket %p\n", sock );
- sock->state = SOCK_CONNECTED; - if (!req->send_len) { async_terminate( req->async, STATUS_SUCCESS );
From: Zebediah Figura zfigura@codeweavers.com
--- server/sock.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/server/sock.c b/server/sock.c index 60b03c13bba..fed8e3b3093 100644 --- a/server/sock.c +++ b/server/sock.c @@ -2359,6 +2359,7 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) if (!ret) { sock->state = SOCK_CONNECTED; + sock->connect_time = current_time;
if (!send_len) return; }