MEDIUM: stream-int/conn-stream: Move blocking flags from SI to CS
Remaining flags and associated functions are move in the conn-stream
scope. These flags are added on the endpoint and not the conn-stream
itself. This way it will be possible to get them from the mux or the
applet. The functions to get or set these flags are renamed accordingly with
the "cs_" prefix and updated to manipualte a conn-stream instead of a
stream-interface.
diff --git a/src/ssl_crtlist.c b/src/ssl_crtlist.c
index f2d6496..c940829 100644
--- a/src/ssl_crtlist.c
+++ b/src/ssl_crtlist.c
@@ -902,7 +902,7 @@
while (lnode) {
chunk_appendf(trash, "%s\n", lnode->key);
if (ci_putchk(cs_ic(cs), trash) == -1) {
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
goto yield;
}
lnode = ebmb_next(lnode);
@@ -933,7 +933,7 @@
entry = LIST_ELEM((crtlist->ord_entries).n, typeof(entry), by_crtlist);
chunk_appendf(trash, "# %s\n", crtlist->node.key);
if (ci_putchk(cs_ic(cs), trash) == -1) {
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
goto yield;
}
}
@@ -952,7 +952,7 @@
chunk_appendf(trash, "\n");
if (ci_putchk(cs_ic(cs), trash) == -1) {
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
goto yield;
}
}
@@ -1068,7 +1068,7 @@
/* This state just print the update message */
chunk_printf(trash, "Inserting certificate '%s' in crt-list '%s'", store->path, crtlist->node.key);
if (ci_putchk(cs_ic(cs), trash) == -1) {
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
goto yield;
}
appctx->st2 = SETCERT_ST_GEN;
@@ -1129,16 +1129,16 @@
chunk_appendf(trash, "%s", err);
chunk_appendf(trash, "Success!\n");
if (ci_putchk(cs_ic(cs), trash) == -1)
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
free_trash_chunk(trash);
/* success: call the release function and don't come back */
return 1;
yield:
/* store the state */
if (ci_putchk(cs_ic(cs), trash) == -1)
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
free_trash_chunk(trash);
- si_rx_endp_more(cs->si); /* let's come back later */
+ cs_rx_endp_more(cs); /* let's come back later */
return 0; /* should come back */
error:
@@ -1146,7 +1146,7 @@
if (trash) {
chunk_appendf(trash, "\n%sFailed!\n", err);
if (ci_putchk(cs_ic(cs), trash) == -1)
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
free_trash_chunk(trash);
}
/* error: call the release function and don't come back */