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
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
Alexey Alyaev
wine
Commits
ab5ca5c0
Commit
ab5ca5c0
authored
19 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
server: Use the new set_fd_user function in create_serial().
parent
9a7124e8
No related branches found
Branches containing commit
Tags
wine-960717
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/serial.c
+5
-13
5 additions, 13 deletions
server/serial.c
with
5 additions
and
13 deletions
server/serial.c
+
5
−
13
View file @
ab5ca5c0
...
...
@@ -131,19 +131,14 @@ int is_serial_fd( struct fd *fd )
struct
object
*
create_serial
(
struct
fd
*
fd
,
unsigned
int
options
)
{
struct
serial
*
serial
;
int
unix_fd
;
if
((
unix_fd
=
dup
(
get_unix_fd
(
fd
)
))
==
-
1
)
return
NULL
;
int
unix_fd
=
get_unix_fd
(
fd
);
/* set the fd back to blocking if necessary */
if
(
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
))
fcntl
(
unix_fd
,
F_SETFL
,
0
);
if
(
!
(
serial
=
alloc_object
(
&
serial_ops
)))
{
close
(
unix_fd
);
return
NULL
;
}
if
(
!
(
serial
=
alloc_object
(
&
serial_ops
)))
return
NULL
;
serial
->
options
=
options
;
serial
->
readinterval
=
0
;
serial
->
readmult
=
0
;
...
...
@@ -155,11 +150,8 @@ struct object *create_serial( struct fd *fd, unsigned int options )
list_init
(
&
serial
->
read_q
);
list_init
(
&
serial
->
write_q
);
list_init
(
&
serial
->
wait_q
);
if
(
!
(
serial
->
fd
=
create_anonymous_fd
(
&
serial_fd_ops
,
unix_fd
,
&
serial
->
obj
)))
{
release_object
(
serial
);
return
NULL
;
}
serial
->
fd
=
(
struct
fd
*
)
grab_object
(
fd
);
set_fd_user
(
fd
,
&
serial_fd_ops
,
&
serial
->
obj
);
return
&
serial
->
obj
;
}
...
...
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