BUG/MEDIUM: spoe: Always try to receive or send the frame to detect shutdowns

Before, we checked if the buffer was allocated or not to avoid sending or
receiving a frame. This was done to not call ci_putblk or co_getblk if there is
nothing to do. But the checks on the buffers are also done in these
functions. So this is not mandatory here. But in these functions, the channel
state is also checked, so an error is returned if it is closed. By skipping the
call, we also skip the checks on the channel state, delaying shutdowns
detection.

Now, we always try to send or receive a frame. So if the corresponding channel
is closed, we can immediatly handle the error.

This patch must be backported in 1.8
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index cb97164..5b6e253 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -1136,17 +1136,13 @@
 	int      ret;
 	uint32_t netint;
 
-	if (si_ic(si)->buf == &buf_empty)
-		goto retry;
-
 	/* 4 bytes are reserved at the beginning of <buf> to store the frame
 	 * length. */
 	netint = htonl(framesz);
 	memcpy(buf, (char *)&netint, 4);
 	ret = ci_putblk(si_ic(si), buf, framesz+4);
-
 	if (ret <= 0) {
-		if (ret == -1) {
+		if ((ret == -3 && si_ic(si)->buf == &buf_empty) || ret == -1) {
 		  retry:
 			si_applet_cant_put(si);
 			return 1; /* retry */
@@ -1167,9 +1163,6 @@
 	int      ret;
 	uint32_t netint;
 
-	if (si_oc(si)->buf == &buf_empty)
-		goto retry;
-
 	ret = co_getblk(si_oc(si), (char *)&netint, 4, 0);
 	if (ret > 0) {
 		framesz = ntohl(netint);