Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
76d88f35
Commit
76d88f35
authored
Feb 21, 2001
by
Niels Möller
Browse files
(do_consuming_read): Added an assert do check that
want_read is true. Check fd->hanged_up first. Rev: src/io.c:1.124
parent
330fd8f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/io.c
View file @
76d88f35
...
...
@@ -588,14 +588,18 @@ do_consuming_read(struct io_callback *c,
CAST_SUBTYPE
(
io_consuming_read
,
self
,
c
);
UINT32
wanted
=
READ_QUERY
(
self
);
if
(
!
wanted
)
{
fd
->
want_read
=
0
;
}
else
if
(
fd
->
hanged_up
)
assert
(
fd
->
want_read
);
if
(
fd
->
hanged_up
)
{
/* If hanged_up is set, pretend that read() returned 0 */
A_WRITE
(
self
->
consumer
,
NULL
);
return
;
}
if
(
!
wanted
)
{
fd
->
want_read
=
0
;
}
else
{
...
...
@@ -633,7 +637,6 @@ do_consuming_read(struct io_callback *c,
A_WRITE
(
self
->
consumer
,
NULL
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment