MEDIUM: connections: Change struct wait_list to wait_event.
When subscribing, we don't need to provide a list element, only the h2 mux
needs it. So instead, Add a list element to struct h2s, and use it when a
list is needed.
This forces us to use the unsubscribe method, since we can't just unsubscribe
by using LIST_DEL anymore.
This patch is larger than it should be because it includes some renaming.
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 4a38de8..e83187b 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -127,13 +127,12 @@
si->end = NULL;
si->state = si->prev_state = SI_ST_INI;
si->ops = &si_embedded_ops;
- si->wait_list.task = tasklet_new();
- if (!si->wait_list.task)
+ si->wait_event.task = tasklet_new();
+ if (!si->wait_event.task)
return -1;
- si->wait_list.task->process = si_cs_io_cb;
- si->wait_list.task->context = si;
- si->wait_list.wait_reason = 0;
- LIST_INIT(&si->wait_list.list);
+ si->wait_event.task->process = si_cs_io_cb;
+ si->wait_event.task->context = si;
+ si->wait_event.wait_reason = 0;
return 0;
}