MINOR: channel/stconn: Replace channel_shutr_now() by sc_schedule_abort()
After the flag renaming, it is now the turn for the channel function to be
renamed and moved in the SC scope. channel_shutr_now() is replaced by
sc_schedule_abort(). The request channel is replaced by the front SC and the
response is replace by the back SC.
diff --git a/src/cli.c b/src/cli.c
index 0de6203..f3562ae 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -2360,7 +2360,7 @@
return argl; /* return the number of elements in the array */
} else if (strcmp("quit", args[0]) == 0) {
- channel_shutr_now(&s->req);
+ sc_schedule_abort(s->scf);
channel_shutw_now(&s->res);
return argl; /* return the number of elements in the array */
} else if (strcmp(args[0], "operator") == 0) {
diff --git a/src/hlua.c b/src/hlua.c
index 913b237..a00a114 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -8162,7 +8162,7 @@
channel_auto_read(res);
channel_auto_close(res);
- channel_shutr_now(res);
+ sc_schedule_abort(s->scb);
finst = ((htxn->dir == SMP_OPT_DIR_REQ) ? SF_FINST_R : SF_FINST_D);
goto done;
diff --git a/src/http_ana.c b/src/http_ana.c
index 3ae76ed..1ad56e4 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -4273,7 +4273,7 @@
goto check_channel_flags;
if (!(chn_cons(chn)->flags & (SC_FL_SHUTW|SC_FL_SHUTW_NOW))) {
- channel_shutr_now(chn);
+ sc_schedule_abort(s->scf);
channel_shutw_now(chn);
}
}
@@ -4372,7 +4372,7 @@
* transaction, so we can close it.
*/
if (!(chn_cons(chn)->flags & (SC_FL_SHUTW|SC_FL_SHUTW_NOW))) {
- channel_shutr_now(chn);
+ sc_schedule_abort(s->scb);
channel_shutw_now(chn);
}
}
@@ -4449,7 +4449,7 @@
channel_auto_read(res);
channel_auto_close(res);
- channel_shutr_now(res);
+ sc_schedule_abort(s->scb);
s->scb->flags |= SC_FL_EOI; /* The response is terminated, add EOI */
htxbuf(&res->buf)->flags |= HTX_FL_EOM; /* no more data are expected */
}
@@ -4512,7 +4512,7 @@
channel_htx_erase(&s->req, htxbuf(&s->req.buf));
channel_auto_read(&s->res);
channel_auto_close(&s->res);
- channel_shutr_now(&s->res);
+ sc_schedule_abort(s->scb);
}
struct http_reply *http_error_message(struct stream *s)
diff --git a/src/stream.c b/src/stream.c
index cef544f..f1b4c5b 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -861,7 +861,7 @@
channel_auto_read(oc);
channel_auto_close(oc);
- channel_shutr_now(oc);
+ sc_schedule_abort(s->scb);
}
int stream_set_timeout(struct stream *s, enum act_timeout_name name, int timeout)
@@ -2309,7 +2309,7 @@
else {
s->scb->state = SC_ST_CLO; /* shutw+ini = abort */
channel_shutw_now(req); /* fix buffer flags upon abort */
- channel_shutr_now(res);
+ sc_schedule_abort(scb);
}
}
@@ -2381,7 +2381,7 @@
/* shutdown(write) done on server side, we must stop the client too */
if (unlikely((scb->flags & SC_FL_SHUTW) && !(scf->flags & (SC_FL_SHUTR|SC_FL_ABRT_WANTED))) &&
!req->analysers)
- channel_shutr_now(req);
+ sc_schedule_abort(scf);
/* shutdown(read) pending */
if (unlikely((scf->flags & (SC_FL_SHUTR|SC_FL_ABRT_WANTED)) == SC_FL_ABRT_WANTED)) {
@@ -2501,7 +2501,7 @@
/* shutdown(write) done on the client side, we must stop the server too */
if (unlikely((scf->flags & SC_FL_SHUTW) && !(scb->flags & (SC_FL_SHUTR|SC_FL_ABRT_WANTED))) &&
!res->analysers)
- channel_shutr_now(res);
+ sc_schedule_abort(scb);
/* shutdown(read) pending */
if (unlikely((scb->flags & (SC_FL_SHUTR|SC_FL_ABRT_WANTED)) == SC_FL_ABRT_WANTED)) {
@@ -2782,7 +2782,7 @@
return;
channel_shutw_now(&stream->req);
- channel_shutr_now(&stream->res);
+ sc_schedule_abort(stream->scb);
stream->task->nice = 1024;
if (!(stream->flags & SF_ERR_MASK))
stream->flags |= why;