Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jackie Jiang
wine
Commits
3591e5fd
Commit
3591e5fd
authored
10 years ago
by
Bruno Jesus
Committed by
Alexandre Julliard
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
server: Store the time of the socket connection.
Based on a patch by Erich Hoover.
parent
8821967b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/sock.c
+5
-0
5 additions, 0 deletions
server/sock.c
with
5 additions
and
0 deletions
server/sock.c
+
5
−
0
View file @
3591e5fd
...
...
@@ -107,6 +107,7 @@ struct sock
unsigned
int
message
;
/* message to send */
obj_handle_t
wparam
;
/* message wparam (socket handle) */
int
errors
[
FD_MAX_EVENTS
];
/* event errors */
timeout_t
connect_time
;
/* time the socket was connected */
struct
sock
*
deferred
;
/* socket that waits for a deferred accept */
struct
async_queue
*
read_q
;
/* queue for asynchronous reads */
struct
async_queue
*
write_q
;
/* queue for asynchronous writes */
...
...
@@ -401,6 +402,7 @@ static void sock_poll_event( struct fd *fd, int event )
/* we got connected */
sock
->
state
|=
FD_WINE_CONNECTED
|
FD_READ
|
FD_WRITE
;
sock
->
state
&=
~
FD_CONNECT
;
sock
->
connect_time
=
current_time
;
}
}
else
if
(
sock
->
state
&
FD_WINE_LISTENING
)
...
...
@@ -618,6 +620,7 @@ static void init_sock(struct sock *sock)
sock
->
window
=
0
;
sock
->
message
=
0
;
sock
->
wparam
=
0
;
sock
->
connect_time
=
0
;
sock
->
deferred
=
NULL
;
sock
->
read_q
=
NULL
;
sock
->
write_q
=
NULL
;
...
...
@@ -725,6 +728,7 @@ static struct sock *accept_socket( obj_handle_t handle )
acceptsock
->
family
=
sock
->
family
;
acceptsock
->
window
=
sock
->
window
;
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
,
...
...
@@ -778,6 +782,7 @@ static int accept_into_socket( struct sock *sock, struct sock *acceptsock )
acceptsock
->
family
=
sock
->
family
;
acceptsock
->
wparam
=
0
;
acceptsock
->
deferred
=
NULL
;
acceptsock
->
connect_time
=
current_time
;
release_object
(
acceptsock
->
fd
);
acceptsock
->
fd
=
newfd
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment