From 97a41cbde80ea4439c08c6451d44d48e5deab5c1 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 7 Mar 2008 17:37:15 +0000 Subject: [PATCH] Mon Mar 3 11:23:17 EST 2008 Pekka.Pessi@nokia.com * test_simple.c: fixed race condition in test_simple.c git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7810 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/libsofia-sip-ua/nua/test_simple.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/test_simple.c b/libs/sofia-sip/libsofia-sip-ua/nua/test_simple.c index 4997908f89..4176ce728f 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/test_simple.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/test_simple.c @@ -727,7 +727,10 @@ int test_subscribe_notify(struct context *ctx) TEST_1(e = es); TEST_E(e->data->e_event, nua_r_subscribe); TEST_1(e->data->e_status == 202 || e->data->e_status == 200); TEST_1(tl_find(e->data->e_tags, nutag_substate)); - TEST(tl_find(e->data->e_tags, nutag_substate)->t_value, nua_substate_pending); + if (es == a->events->head) + TEST(tl_find(e->data->e_tags, nutag_substate)->t_value, nua_substate_embryonic); + else + TEST(tl_find(e->data->e_tags, nutag_substate)->t_value, nua_substate_pending); TEST_1(sip = sip_object(e->data->e_msg)); TEST_1(sip->sip_expires); TEST_1(sip->sip_expires->ex_delta <= 333);