Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ab5ca5c0
Commit
ab5ca5c0
authored
Jan 24, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use the new set_fd_user function in create_serial().
parent
9a7124e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
serial.c
server/serial.c
+5
-13
No files found.
server/serial.c
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment