[MEDIUM] buffers: ensure buffer_shut* are properly called upon shutdowns
It is important that buffer states reflect the state of both sides so
that we can remove client and server state inter-dependencies.
diff --git a/include/types/buffers.h b/include/types/buffers.h
index a9de965..7539901 100644
--- a/include/types/buffers.h
+++ b/include/types/buffers.h
@@ -28,12 +28,12 @@
/* The BF_* macros designate Buffer Flags, which may be ORed in the bit field
* member 'flags' in struct buffer.
*/
-#define BF_SHUTR_PENDING 1
-#define BF_SHUTR_DONE 2
+#define BF_SHUTR_PENDING 1 /* ignored if BF_SHUTW_DONE */
+#define BF_SHUTR_DONE 2 /* takes precedence over BF_SHUTR_PENDING */
#define BF_SHUTR_STATUS (BF_SHUTR_PENDING|BF_SHUTR_DONE)
-#define BF_SHUTW_PENDING 4
-#define BF_SHUTW_DONE 8
+#define BF_SHUTW_PENDING 4 /* ignored if BF_SHUTW_DONE */
+#define BF_SHUTW_DONE 8 /* takes precedence over BF_SHUTW_PENDING */
#define BF_SHUTW_STATUS (BF_SHUTW_PENDING|BF_SHUTW_DONE)
#define BF_PARTIAL_READ 16