Commit 2478048e authored by Pekka Pessi's avatar Pekka Pessi
Browse files

test_sip_events: fix TEST case NUA-12.5: un-SUBSCRIBE

NUA waits now for final NOTIFY.
parent 8b16d227
......@@ -330,15 +330,32 @@ int test_events(struct context *ctx)
TEST_1(!sip->sip_subscription_state->ss_expires);
TEST_1(tl_find(n_tags, nutag_substate));
TEST(tl_find(n_tags, nutag_substate)->t_value, nua_substate_terminated);
TEST_1(e = e->next);
}
TEST_E(e->data->e_event, nua_r_unsubscribe);
TEST_1(tl_find(e->data->e_tags, nutag_substate));
TEST(tl_find(e->data->e_tags, nutag_substate)->t_value,
TEST_E(e->data->e_event, nua_r_unsubscribe);
TEST_1(tl_find(e->data->e_tags, nutag_substate));
TEST(tl_find(e->data->e_tags, nutag_substate)->t_value,
nua_substate_terminated);
/* Currently, NOTIFY is dropped after successful response to unsubscribe */
/* But we don't really care.. */
/* TEST_1(!e->next); */
}
else {
TEST_E(e->data->e_event, nua_r_unsubscribe);
TEST_1(tl_find(e->data->e_tags, nutag_substate));
/* NOTIFY is no more dropped after successful response to unsubscribe */
TEST(tl_find(e->data->e_tags, nutag_substate)->t_value,
nua_substate_active);
TEST_1(e = e->next);
TEST_E(e->data->e_event, nua_i_notify);
TEST_1(sip = sip_object(e->data->e_msg));
n_tags = e->data->e_tags;
TEST_1(sip->sip_event);
TEST_1(sip->sip_subscription_state);
TEST_S(sip->sip_subscription_state->ss_substate, "terminated");
TEST_1(!sip->sip_subscription_state->ss_expires);
TEST_1(tl_find(n_tags, nutag_substate));
TEST(tl_find(n_tags, nutag_substate)->t_value, nua_substate_terminated);
}
TEST_1(!e->next);
free_events_in_list(ctx, a->events);
/* Server events: nua_i_subscription with terminated status */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment