mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-11 17:46:57 +02:00
MINOR: stream-int: make use of si_done_{get,put}() in shut{w,r}
It's cleaner to use these functions there to properly clear the flags.
This commit is contained in:
parent
af4f6f6d2f
commit
43e69dc1eb
@ -164,7 +164,7 @@ static void stream_int_shutr(struct stream_interface *si)
|
|||||||
return;
|
return;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
ic->rex = TICK_ETERNITY;
|
ic->rex = TICK_ETERNITY;
|
||||||
si->flags &= ~SI_FL_WAIT_ROOM;
|
si_done_put(si);
|
||||||
|
|
||||||
if (si->state != SI_ST_EST && si->state != SI_ST_CON)
|
if (si->state != SI_ST_EST && si->state != SI_ST_CON)
|
||||||
return;
|
return;
|
||||||
@ -200,7 +200,7 @@ static void stream_int_shutw(struct stream_interface *si)
|
|||||||
return;
|
return;
|
||||||
oc->flags |= CF_SHUTW;
|
oc->flags |= CF_SHUTW;
|
||||||
oc->wex = TICK_ETERNITY;
|
oc->wex = TICK_ETERNITY;
|
||||||
si->flags &= ~SI_FL_WAIT_DATA;
|
si_done_get(si);
|
||||||
|
|
||||||
if (tick_isset(si->hcto)) {
|
if (tick_isset(si->hcto)) {
|
||||||
ic->rto = si->hcto;
|
ic->rto = si->hcto;
|
||||||
@ -227,7 +227,7 @@ static void stream_int_shutw(struct stream_interface *si)
|
|||||||
/* Note that none of these states may happen with applets */
|
/* Note that none of these states may happen with applets */
|
||||||
si->state = SI_ST_DIS;
|
si->state = SI_ST_DIS;
|
||||||
default:
|
default:
|
||||||
si->flags &= ~(SI_FL_WAIT_ROOM | SI_FL_NOLINGER);
|
si->flags &= ~(SI_FL_WAIT_ROOM | SI_FL_WANT_PUT | SI_FL_NOLINGER);
|
||||||
ic->flags &= ~CF_SHUTR_NOW;
|
ic->flags &= ~CF_SHUTR_NOW;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
ic->rex = TICK_ETERNITY;
|
ic->rex = TICK_ETERNITY;
|
||||||
@ -850,7 +850,7 @@ static void stream_int_shutr_conn(struct stream_interface *si)
|
|||||||
return;
|
return;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
ic->rex = TICK_ETERNITY;
|
ic->rex = TICK_ETERNITY;
|
||||||
si->flags &= ~SI_FL_WAIT_ROOM;
|
si_done_put(si);
|
||||||
|
|
||||||
if (si->state != SI_ST_EST && si->state != SI_ST_CON)
|
if (si->state != SI_ST_EST && si->state != SI_ST_CON)
|
||||||
return;
|
return;
|
||||||
@ -886,7 +886,7 @@ static void stream_int_shutw_conn(struct stream_interface *si)
|
|||||||
return;
|
return;
|
||||||
oc->flags |= CF_SHUTW;
|
oc->flags |= CF_SHUTW;
|
||||||
oc->wex = TICK_ETERNITY;
|
oc->wex = TICK_ETERNITY;
|
||||||
si->flags &= ~SI_FL_WAIT_DATA;
|
si_done_get(si);
|
||||||
|
|
||||||
if (tick_isset(si->hcto)) {
|
if (tick_isset(si->hcto)) {
|
||||||
ic->rto = si->hcto;
|
ic->rto = si->hcto;
|
||||||
@ -943,7 +943,7 @@ static void stream_int_shutw_conn(struct stream_interface *si)
|
|||||||
si->state = SI_ST_DIS;
|
si->state = SI_ST_DIS;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
si->flags &= ~(SI_FL_WAIT_ROOM | SI_FL_NOLINGER);
|
si->flags &= ~(SI_FL_WAIT_ROOM | SI_FL_WANT_PUT | SI_FL_NOLINGER);
|
||||||
ic->flags &= ~CF_SHUTR_NOW;
|
ic->flags &= ~CF_SHUTR_NOW;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
ic->rex = TICK_ETERNITY;
|
ic->rex = TICK_ETERNITY;
|
||||||
@ -1327,7 +1327,7 @@ void stream_sock_read0(struct stream_interface *si)
|
|||||||
return;
|
return;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
ic->rex = TICK_ETERNITY;
|
ic->rex = TICK_ETERNITY;
|
||||||
si->flags &= ~SI_FL_WAIT_ROOM;
|
si_done_put(si);
|
||||||
|
|
||||||
if (si->state != SI_ST_EST && si->state != SI_ST_CON)
|
if (si->state != SI_ST_EST && si->state != SI_ST_CON)
|
||||||
return;
|
return;
|
||||||
@ -1353,7 +1353,7 @@ void stream_sock_read0(struct stream_interface *si)
|
|||||||
oc->flags |= CF_SHUTW;
|
oc->flags |= CF_SHUTW;
|
||||||
oc->wex = TICK_ETERNITY;
|
oc->wex = TICK_ETERNITY;
|
||||||
|
|
||||||
si->flags &= ~(SI_FL_WAIT_DATA | SI_FL_WAIT_ROOM);
|
si_done_get(si);
|
||||||
|
|
||||||
si->state = SI_ST_DIS;
|
si->state = SI_ST_DIS;
|
||||||
si->exp = TICK_ETERNITY;
|
si->exp = TICK_ETERNITY;
|
||||||
@ -1417,7 +1417,7 @@ static void stream_int_shutr_applet(struct stream_interface *si)
|
|||||||
return;
|
return;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
ic->rex = TICK_ETERNITY;
|
ic->rex = TICK_ETERNITY;
|
||||||
si->flags &= ~SI_FL_WAIT_ROOM;
|
si_done_put(si);
|
||||||
|
|
||||||
/* Note: on shutr, we don't call the applet */
|
/* Note: on shutr, we don't call the applet */
|
||||||
|
|
||||||
@ -1452,7 +1452,7 @@ static void stream_int_shutw_applet(struct stream_interface *si)
|
|||||||
return;
|
return;
|
||||||
oc->flags |= CF_SHUTW;
|
oc->flags |= CF_SHUTW;
|
||||||
oc->wex = TICK_ETERNITY;
|
oc->wex = TICK_ETERNITY;
|
||||||
si->flags &= ~SI_FL_WAIT_DATA;
|
si_done_get(si);
|
||||||
|
|
||||||
if (tick_isset(si->hcto)) {
|
if (tick_isset(si->hcto)) {
|
||||||
ic->rto = si->hcto;
|
ic->rto = si->hcto;
|
||||||
@ -1483,7 +1483,7 @@ static void stream_int_shutw_applet(struct stream_interface *si)
|
|||||||
si_applet_release(si);
|
si_applet_release(si);
|
||||||
si->state = SI_ST_DIS;
|
si->state = SI_ST_DIS;
|
||||||
default:
|
default:
|
||||||
si->flags &= ~(SI_FL_WAIT_ROOM | SI_FL_NOLINGER);
|
si->flags &= ~(SI_FL_WAIT_ROOM | SI_FL_WANT_PUT | SI_FL_NOLINGER);
|
||||||
ic->flags &= ~CF_SHUTR_NOW;
|
ic->flags &= ~CF_SHUTR_NOW;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
ic->rex = TICK_ETERNITY;
|
ic->rex = TICK_ETERNITY;
|
||||||
|
Loading…
Reference in New Issue
Block a user