Fix potential race in route table load
If route tables are received in quick succession there is a potential
race condition that can cause the xAPPs thread to use a stale pointer
likely resulting in a segfault.
Issue-ID: RIC-674
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: I5536d3f30646dca0ed375468719fa3cf0920c103
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
diff --git a/test/rmr_si_test.c b/test/rmr_si_test.c
index 16d570f..3ae8d9d 100644
--- a/test/rmr_si_test.c
+++ b/test/rmr_si_test.c
@@ -60,7 +60,6 @@
// specific test tools in this directory
#undef NNG_UNDER_TEST
#include "test_support.c" // things like fail_if()
-#include "test_ctx_support.c" // dummy context support
#include "test_msg_support.c"
#include "test_gen_rt.c"
@@ -75,6 +74,8 @@
#include "rmr_si.c"
#include "mbuf_api.c"
+#include "test_ctx_support.c" // dummy context support
+
static void gen_rt( uta_ctx_t* ctx ); // defined in sr_si_static_test, but used by a few others (eliminate order requirement below)