Commit 49d10a9c authored by Pekka Pessi's avatar Pekka Pessi

test_nua: fixed timing issued by using save_until_final_response

darcs-hash:20070416191148-55b16-662496cc026737b0bee324b8d0f27c4efbdd816f.gz
parent 50f3aeae
......@@ -1135,7 +1135,7 @@ int test_bye_after_receiving_401(struct context *ctx)
INVITE(b, b_call, b_call->nh,
SIPTAG_SUBJECT_STR("NUA-6.3 re-INVITE"),
TAG_END());
run_ab_until(ctx, -1, reject_reinvite_401, -1, until_final_response);
run_ab_until(ctx, -1, reject_reinvite_401, -1, save_until_final_response);
TEST_1(nua_handle_has_active_call(a_call->nh));
TEST_1(nua_handle_has_active_call(b_call->nh));
......@@ -1210,7 +1210,7 @@ int test_bye_after_sending_401(struct context *ctx)
INVITE(b, b_call, b_call->nh,
SIPTAG_SUBJECT_STR("NUA-6.4.1 re-INVITE"),
TAG_END());
run_ab_until(ctx, -1, reject_reinvite_401, -1, until_final_response);
run_ab_until(ctx, -1, reject_reinvite_401, -1, save_until_final_response);
TEST_1(nua_handle_has_active_call(a_call->nh));
TEST_1(nua_handle_has_active_call(b_call->nh));
......@@ -1286,7 +1286,7 @@ int test_bye_after_receiving_401_to_update(struct context *ctx)
SIPTAG_SUBJECT_STR("NUA-6.4.2 UPDATE"),
TAG_END());
BYE(b, b_call, b_call->nh, TAG_END()); /* Queued until nua_authenticate */
run_ab_until(ctx, -1, reject_reinvite_401, -1, until_final_response);
run_ab_until(ctx, -1, reject_reinvite_401, -1, save_until_final_response);
TEST_1(nua_handle_has_active_call(a_call->nh));
TEST_1(nua_handle_has_active_call(b_call->nh));
......
......@@ -55,7 +55,9 @@ int until_final_response(CONDITION_PARAMS)
int save_until_final_response(CONDITION_PARAMS)
{
save_event_in_list(ctx, event, ep, call);
return event >= nua_r_set_params && status >= 200;
return
nua_r_set_params <= event && event < nua_i_network_changed
&& status >= 200;
}
/** Save events.
......
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