Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
LSH
lsh
Commits
5c8d259a
Commit
5c8d259a
authored
Oct 29, 1998
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle LSH_HOLD. New function init_backend().
Rev: src/io.c:1.20
parent
d35cd1fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
src/io.c
src/io.c
+23
-6
No files found.
src/io.c
View file @
5c8d259a
...
...
@@ -274,7 +274,13 @@ static int io_iter(struct io_backend *b)
/* FIXME: Perhaps we should always set LSH_FAIL in
* this case? */
}
#endif
#endif
if
(
res
&
LSH_HOLD
)
{
/* This flag should not be combined with anything else */
assert
(
res
==
LSH_HOLD
);
fd
->
on_hold
=
1
;
}
if
(
res
&
LSH_DIE
)
{
if
(
fd
->
buffer
)
...
...
@@ -438,6 +444,17 @@ void io_run(struct io_backend *b)
;
}
void
init_backend
(
struct
io_backend
*
b
)
{
b
->
nio
=
0
;
b
->
io
=
NULL
;
b
->
nlisten
=
0
;
b
->
listen
=
NULL
;
b
->
nconnect
=
0
;
b
->
connect
=
NULL
;
b
->
callouts
=
NULL
;
}
/*
* Fill in ADDR from HOST, SERVICE and PROTOCOL.
* Supplying a null pointer for HOST means use INADDR_ANY.
...
...
@@ -658,10 +675,10 @@ struct io_fd *io_read(struct io_backend *b,
return
f
;
}
struct
io_fd
*
io_write
(
struct
io_backend
*
b
,
int
fd
,
UINT32
block_size
,
struct
close_callback
*
close_callback
)
struct
abstract_write
*
io_write
(
struct
io_backend
*
b
,
int
fd
,
UINT32
block_size
,
struct
close_callback
*
close_callback
)
{
struct
io_fd
*
f
;
struct
write_buffer
*
buffer
=
write_buffer_alloc
(
block_size
);
...
...
@@ -683,6 +700,6 @@ struct io_fd *io_write(struct io_backend *b,
b
->
io
=
f
;
b
->
nio
++
;
return
f
;
return
&
buffer
->
super
;
}
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