MINOR: stream-int: replace SI_FL_WANT_PUT with !SI_FL_RX_WAIT_EP

The SI_FL_WANT_PUT flag is used in an awkward way, sometimes it's
set by the stream-interface to mean "I have something to deliver",
sometimes it's cleared by the channel to say "I don't want you to
send what you have", and it has to be set back once CF_DONT_READ
is cleared. This will have to be split between SI_FL_RX_WAIT_EP
and SI_FL_RXBLK_CHAN. This patch only replaces all uses of the
flag with its natural (but negated) replacement SI_FL_RX_WAIT_EP.
The code is expected to be strictly equivalent. The now unused flag
was completely removed.
diff --git a/contrib/debug/flags.c b/contrib/debug/flags.c
index 7ff6372..f8a4d03 100644
--- a/contrib/debug/flags.c
+++ b/contrib/debug/flags.c
@@ -217,7 +217,6 @@
 	SHOW_FLAG(f, SI_FL_NOLINGER);
 	SHOW_FLAG(f, SI_FL_NOHALF);
 	SHOW_FLAG(f, SI_FL_SRC_ADDR);
-	SHOW_FLAG(f, SI_FL_WANT_PUT);
 	SHOW_FLAG(f, SI_FL_WANT_GET);
 
 	SHOW_FLAG(f, SI_FL_RXBLK_CHAN);
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 6d46381..9100778 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -262,25 +262,27 @@
 /* Report that a stream interface wants to put some data into the input buffer */
 static inline void si_want_put(struct stream_interface *si)
 {
-	si->flags |= SI_FL_WANT_PUT;
+	si->flags &= ~SI_FL_RX_WAIT_EP;
 }
 
 /* Report that a stream interface failed to put some data into the input buffer */
 static inline void si_cant_put(struct stream_interface *si)
 {
-	si->flags |= SI_FL_WANT_PUT | SI_FL_RXBLK_ROOM;
+	si->flags |=  SI_FL_RXBLK_ROOM;
+	si->flags &= ~SI_FL_RX_WAIT_EP;
 }
 
 /* Report that a stream interface doesn't want to put data into the input buffer */
 static inline void si_stop_put(struct stream_interface *si)
 {
-	si->flags &= ~SI_FL_WANT_PUT;
+	si->flags |=  SI_FL_RX_WAIT_EP;
 }
 
 /* Report that a stream interface won't put any more data into the input buffer */
 static inline void si_done_put(struct stream_interface *si)
 {
-	si->flags &= ~(SI_FL_WANT_PUT | SI_FL_RXBLK_ROOM);
+	si->flags &= ~SI_FL_RXBLK_ROOM;
+	si->flags |=  SI_FL_RX_WAIT_EP;
 }
 
 /* Returns non-zero if the stream interface's Rx path is blocked */
@@ -387,7 +389,7 @@
 }
 
 /* This is to be used after making some room available in a channel. It will
- * return without doing anything if {SI_FL_WANT_PUT,SI_FL_RXBLK_ROOM} != {1,0}.
+ * return without doing anything if {SI_FL_RX_WAIT_EP,SI_FL_RXBLK_ROOM} != {0,0}.
  * It will then call ->chk_rcv() to enable receipt of new data.
  */
 static inline void si_chk_rcv(struct stream_interface *si)
@@ -395,13 +397,13 @@
 	if (si->flags & SI_FL_RXBLK_ROOM)
 		return;
 
-	if (!(si->flags & SI_FL_WANT_PUT))
+	if (si->flags & SI_FL_RX_WAIT_EP)
 		return;
 
 	if (si->state > SI_ST_EST)
 		return;
 
-	si->flags &= ~SI_FL_WANT_PUT;
+	si->flags |= SI_FL_RX_WAIT_EP;
 	si->ops->chk_rcv(si);
 }
 
diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h
index 1f1716f..d9eeacb 100644
--- a/include/types/stream_interface.h
+++ b/include/types/stream_interface.h
@@ -72,7 +72,7 @@
 	SI_FL_NOLINGER   = 0x00000080,  /* may close without lingering. One-shot. */
 	SI_FL_NOHALF     = 0x00000100,  /* no half close, close both sides at once */
 	SI_FL_SRC_ADDR   = 0x00001000,  /* get the source ip/port with getsockname */
-	SI_FL_WANT_PUT   = 0x00002000,  /* a stream-int would like to put some data into the buffer */
+	/* unused:         0x00002000 */
 	SI_FL_WANT_GET   = 0x00004000,  /* a stream-int would like to get some data from the buffer */
 	SI_FL_CLEAN_ABRT = 0x00008000,  /* SI_FL_ERR is used to report aborts, and not SHUTR */
 
diff --git a/src/stream_interface.c b/src/stream_interface.c
index a4bbca5..bb1dc7a 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -225,7 +225,8 @@
 		/* Note that none of these states may happen with applets */
 		si->state = SI_ST_DIS;
 	default:
-		si->flags &= ~(SI_FL_RXBLK_ROOM | SI_FL_WANT_PUT | SI_FL_NOLINGER);
+		si->flags &= ~(SI_FL_RXBLK_ROOM | SI_FL_NOLINGER);
+		si->flags |= SI_FL_RX_WAIT_EP;
 		ic->flags &= ~CF_SHUTR_NOW;
 		ic->flags |= CF_SHUTR;
 		ic->rex = TICK_ETERNITY;
@@ -726,7 +727,7 @@
 	if (!(si->wait_event.wait_reason & SUB_CAN_RECV)) {
 		ret |= si_cs_recv(cs);
 		if (!(si_ic(si)->flags & (CF_SHUTR|CF_DONT_READ)))
-			si->flags |= SI_FL_WANT_PUT;
+			si->flags &= ~SI_FL_RX_WAIT_EP;
 	}
 	if (ret != 0)
 		si_cs_process(cs);
@@ -860,12 +861,12 @@
 	 * handled at the latest moment.
 	 */
 	if (obj_type(si_f->end) == OBJ_TYPE_APPCTX &&
-	    (((si_f->flags & (SI_FL_WANT_PUT|SI_FL_RXBLK_ROOM)) == SI_FL_WANT_PUT) ||
+	    (((si_f->flags & (SI_FL_RX_WAIT_EP|SI_FL_RXBLK_ROOM)) == 0) ||
 	     ((si_f->flags & (SI_FL_WANT_GET|SI_FL_WAIT_DATA)) == SI_FL_WANT_GET)))
 		appctx_wakeup(si_appctx(si_f));
 
 	if (obj_type(si_b->end) == OBJ_TYPE_APPCTX &&
-	    (((si_b->flags & (SI_FL_WANT_PUT|SI_FL_RXBLK_ROOM)) == SI_FL_WANT_PUT) ||
+	    (((si_b->flags & (SI_FL_RX_WAIT_EP|SI_FL_RXBLK_ROOM)) == 0) ||
 	     ((si_b->flags & (SI_FL_WANT_GET|SI_FL_WAIT_DATA)) == SI_FL_WANT_GET)))
 		appctx_wakeup(si_appctx(si_b));
 }
@@ -983,7 +984,8 @@
 		si->state = SI_ST_DIS;
 		/* fall through */
 	default:
-		si->flags &= ~(SI_FL_RXBLK_ROOM | SI_FL_WANT_PUT | SI_FL_NOLINGER);
+		si->flags &= ~(SI_FL_RXBLK_ROOM | SI_FL_NOLINGER);
+		si->flags |=  SI_FL_RX_WAIT_EP;
 		ic->flags &= ~CF_SHUTR_NOW;
 		ic->flags |= CF_SHUTR;
 		ic->rex = TICK_ETERNITY;
@@ -1416,7 +1418,7 @@
 	/* If the applet wants to write and the channel is closed, it's a
 	 * broken pipe and it must be reported.
 	 */
-	if ((si->flags & SI_FL_WANT_PUT) && (ic->flags & CF_SHUTR))
+	if (!(si->flags & SI_FL_RX_WAIT_EP) && (ic->flags & CF_SHUTR))
 		si->flags |= SI_FL_ERR;
 
 	/* update the stream-int, channels, and possibly wake the stream up */
@@ -1428,7 +1430,7 @@
 	 * we may have to wakeup the appctx immediately.
 	 */
 	if (!task_in_rq(si_task(si)) &&
-	    (((si->flags & (SI_FL_WANT_PUT|SI_FL_RXBLK_ROOM)) == SI_FL_WANT_PUT) ||
+	    (((si->flags & (SI_FL_RX_WAIT_EP|SI_FL_RXBLK_ROOM)) == 0) ||
 	     ((si->flags & (SI_FL_WANT_GET|SI_FL_WAIT_DATA)) == SI_FL_WANT_GET)))
 		appctx_wakeup(si_appctx(si));
 }
@@ -1516,7 +1518,8 @@
 		si_applet_release(si);
 		si->state = SI_ST_DIS;
 	default:
-		si->flags &= ~(SI_FL_RXBLK_ROOM | SI_FL_WANT_PUT | SI_FL_NOLINGER);
+		si->flags &= ~(SI_FL_RXBLK_ROOM | SI_FL_NOLINGER);
+		si->flags |= SI_FL_RX_WAIT_EP;
 		ic->flags &= ~CF_SHUTR_NOW;
 		ic->flags |= CF_SHUTR;
 		ic->rex = TICK_ETERNITY;