REORG: stream_interface: create a struct sock_ops to hold socket operations
These operators are used regardless of the socket protocol family. Move
them to a "sock_ops" struct. ->read and ->write have been moved there too
as they have no reason to remain at the protocol level.
diff --git a/src/dumpstats.c b/src/dumpstats.c
index cddbc3e..465844f 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -1376,7 +1376,7 @@
/* Let's close for real now. We just close the request
* side, the conditions below will complete if needed.
*/
- si->shutw(si);
+ si->sock.shutw(si);
break;
}
else if (si->applet.st0 == STAT_CLI_GETREQ) {
@@ -1518,7 +1518,7 @@
* we forward the close to the request side so that it flows upstream to
* the client.
*/
- si->shutw(si);
+ si->sock.shutw(si);
}
if ((req->flags & BF_SHUTW) && (si->state == SI_ST_EST) && (si->applet.st0 < STAT_CLI_OUTPUT)) {
@@ -1528,12 +1528,12 @@
* the client side has closed. So we'll forward this state downstream
* on the response buffer.
*/
- si->shutr(si);
+ si->sock.shutr(si);
res->flags |= BF_READ_NULL;
}
/* update all other flags and resync with the other side */
- si->update(si);
+ si->sock.update(si);
/* we don't want to expire timeouts while we're processing requests */
si->ib->rex = TICK_ETERNITY;
@@ -1735,26 +1735,26 @@
if (s->txn.meth == HTTP_METH_POST) {
if (stats_http_redir(si, s->be->uri_auth)) {
si->applet.st0 = 1;
- si->shutw(si);
+ si->sock.shutw(si);
}
} else {
if (stats_dump_http(si, s->be->uri_auth)) {
si->applet.st0 = 1;
- si->shutw(si);
+ si->sock.shutw(si);
}
}
}
if ((res->flags & BF_SHUTR) && (si->state == SI_ST_EST))
- si->shutw(si);
+ si->sock.shutw(si);
if ((req->flags & BF_SHUTW) && (si->state == SI_ST_EST) && si->applet.st0) {
- si->shutr(si);
+ si->sock.shutr(si);
res->flags |= BF_READ_NULL;
}
/* update all other flags and resync with the other side */
- si->update(si);
+ si->sock.update(si);
/* we don't want to expire timeouts while we're processing requests */
si->ib->rex = TICK_ETERNITY;