Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
LSH
lsh
Commits
f43f748f
Commit
f43f748f
authored
Sep 22, 1998
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added STATIC_HEADER to non-heap allocated objects.Initialize the
on_hold field properly. Rev: src/io.c:1.12
parent
553c8532
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
src/io.c
src/io.c
+11
-5
No files found.
src/io.c
View file @
f43f748f
...
...
@@ -53,6 +53,8 @@ static int do_read(struct abstract_read **r, UINT32 length, UINT8 *buffer)
struct
fd_read
*
closure
=
(
struct
fd_read
*
)
*
r
;
MDEBUG
(
closure
);
while
(
1
)
{
int
res
=
read
(
closure
->
fd
,
buffer
,
length
);
...
...
@@ -205,8 +207,8 @@ static int io_iter(struct io_backend *b)
break
;
}
else
if
(
!
res
)
fatal
(
"What now?"
);
//
else if (!res)
//
fatal("What now?");
else
fd
->
buffer
->
start
+=
res
;
}
...
...
@@ -221,7 +223,7 @@ static int io_iter(struct io_backend *b)
&&
(
fds
[
i
].
revents
&
POLLIN
))
{
struct
fd_read
r
=
{
{
do_read
},
fd
->
fd
};
{
{
STATIC_HEADER
do_read
},
fd
->
fd
};
/* The handler function may install a new handler */
if
(
!
READ_HANDLER
(
fd
->
handler
,
...
...
@@ -474,10 +476,14 @@ struct abstract_write *io_read_write(struct io_backend *b,
f
->
fd
=
fd
;
f
->
please_close
=
0
;
/* Reading */
f
->
handler
=
read_callback
;
f
->
close_callback
=
close_callback
;
f
->
on_hold
=
0
;
/* Writing */
f
->
buffer
=
buffer
;
f
->
close_callback
=
close_callback
;
f
->
next
=
b
->
io
;
b
->
io
=
f
;
...
...
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