MINOR: channel: rename bi_erase() to channel_truncate()
It applies to the channel and it doesn't erase outgoing data, only
pending unread data, which is strictly equivalent to what recv()
does with MSG_TRUNC, so that new name is more accurate and intuitive.
diff --git a/src/stream_interface.c b/src/stream_interface.c
index f05f4a8..9025851 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -125,8 +125,8 @@
channel_abort(si->ib);
channel_auto_close(si->ib);
channel_erase(si->ib);
+ channel_truncate(si->ob);
- bi_erase(si->ob);
if (likely(msg && msg->len))
bo_inject(si->ob, msg->str, msg->len);