MINOR: conn_streams: Remove wait_list from conn_streams.
The conn_streams won't be used for subscribing/waiting for I/O events, after
all, so just remove its wait_list, and send/recv/_wait_list.
diff --git a/src/stream_interface.c b/src/stream_interface.c
index 13f7aa3..eb04043 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -671,7 +671,7 @@
* in the normal buffer.
*/
if (!co_data(oc))
- goto wake_others;
+ return did_send;
/* when we're here, we already know that there is no spliced
* data left, and that there are sendable buffered data.
@@ -723,29 +723,6 @@
cs_want_send(cs);
conn->mux->subscribe(cs, SUB_CAN_SEND, &si->wait_list);
}
-
-wake_others:
- /* Maybe somebody was waiting for this conn_stream, wake them */
- if (did_send) {
- while (!LIST_ISEMPTY(&cs->send_wait_list)) {
- struct wait_list *sw = LIST_ELEM(cs->send_wait_list.n,
- struct wait_list *, list);
- LIST_DEL(&sw->list);
- LIST_INIT(&sw->list);
- sw->wait_reason &= ~SUB_CAN_SEND;
- tasklet_wakeup(sw->task);
- }
- while (!(LIST_ISEMPTY(&cs->sendrecv_wait_list))) {
- struct wait_list *sw = LIST_ELEM(cs->sendrecv_wait_list.n,
- struct wait_list *, list);
- LIST_DEL(&sw->list);
- LIST_INIT(&sw->list);
- LIST_ADDQ(&cs->recv_wait_list, &sw->list);
- sw->wait_reason &= ~SUB_CAN_SEND;
- tasklet_wakeup(sw->task);
- }
-
- }
return did_send;
}
@@ -1357,26 +1334,6 @@
}
ic->last_read = now_ms;
}
- if (cur_read > 0) {
- while (!LIST_ISEMPTY(&cs->recv_wait_list)) {
- struct wait_list *sw = LIST_ELEM(cs->recv_wait_list.n,
- struct wait_list *, list);
- LIST_DEL(&sw->list);
- LIST_INIT(&sw->list);
- sw->wait_reason &= ~SUB_CAN_RECV;
- tasklet_wakeup(sw->task);
- }
- while (!(LIST_ISEMPTY(&cs->sendrecv_wait_list))) {
- struct wait_list *sw = LIST_ELEM(cs->sendrecv_wait_list.n,
- struct wait_list *, list);
- LIST_DEL(&sw->list);
- LIST_INIT(&sw->list);
- LIST_ADDQ(&cs->send_wait_list, &sw->list);
- sw->wait_reason &= ~SUB_CAN_RECV;
- tasklet_wakeup(sw->task);
- }
-
- }
end_recv:
if (conn->flags & CO_FL_ERROR || cs->flags & CS_FL_ERROR)