From 0cd2fa7310f1fdf45443a8a9e3335658b1c3c64c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 25 Dec 2016 18:08:44 -0800 Subject: Substantial fixes for listen & dialers. At this point listening and dialing operations appear to function properly. As part of this I had to break the close logic up since otherwise we had a loop trying to reap a thread from itself. So there is now a separate reaper thread for pipes per-socket. I also changed lists to be a bit more rigid, and allocations now zero memory initially. (We had bugs due to uninitialized memory, and rather than hunt them all down, lets just init them to sane zero values.) --- tests/list.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/list.c') diff --git a/tests/list.c b/tests/list.c index 67e3106b..10668b50 100644 --- a/tests/list.c +++ b/tests/list.c @@ -34,6 +34,10 @@ TestMain("Linked Lists", { Convey("And we can add an item", { mystruct item; + + NNI_LIST_NODE_INIT(&item.nodea); + NNI_LIST_NODE_INIT(&item.nodeb); + nni_list_append(&alist, &item); Convey("It is the first item", { @@ -61,6 +65,11 @@ TestMain("Linked Lists", { mystruct item1; mystruct item2; + NNI_LIST_NODE_INIT(&item1.nodea); + NNI_LIST_NODE_INIT(&item1.nodeb); + NNI_LIST_NODE_INIT(&item2.nodea); + NNI_LIST_NODE_INIT(&item2.nodeb); + nni_list_append(&alist, &item1); nni_list_append(&alist, &item2); -- cgit v1.2.3-70-g09d2