From: Alan T. DeKok Date: Thu, 8 Dec 2016 14:06:10 +0000 (-0500) Subject: assert that we only receive one channel open signal X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb6501130cc96e988724fcac90e8caf80424cbbc;p=thirdparty%2Ffreeradius-server.git assert that we only receive one channel open signal --- diff --git a/src/tests/util/channel_test.c b/src/tests/util/channel_test.c index 46b141a5fc8..36e164ef890 100644 --- a/src/tests/util/channel_test.c +++ b/src/tests/util/channel_test.c @@ -309,12 +309,19 @@ static void *channel_worker(void *arg) MPRINT1("\tWorker got channel event %d\n", ce); if (ce == FR_CHANNEL_OPEN) { + static int already_opened = false; + MPRINT1("\tWorker received a new channel\n"); rad_assert(new_channel == channel); + rad_assert(already_opened == false); + if (fr_channel_worker_receive_open(ctx, new_channel) < 0) { fprintf(stderr, "Failed calling receive open.\n"); exit(1); } + + already_opened = true; + continue; }