Commit 221755a5 authored by jehan's avatar jehan
Browse files

add test case for double refresh

parent 9b6ee4c1
......@@ -164,7 +164,7 @@ int belle_sip_refresher_refresh(belle_sip_refresher_t* refresher,int expires) {
if (belle_sip_transaction_state_is_transient(state)) {
/*operation pending, cannot update authorization headers*/
belle_sip_header_cseq_t* cseq;
belle_sip_warning("Refresher [%p] already have transaction [%p] in state [%s]" ,refresher
belle_sip_message("Refresher [%p] already have transaction [%p] in state [%s]" ,refresher
,refresher->transaction
,belle_sip_transaction_state_to_string(state));
request=BELLE_SIP_REQUEST(belle_sip_object_clone(BELLE_SIP_OBJECT(belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(refresher->transaction)))));
......
......@@ -464,6 +464,10 @@ static void subscribe_test(void) {
end = belle_sip_time_ms();
CU_ASSERT_TRUE(end-begin>=3000);
CU_ASSERT_TRUE(end-begin<5000);
/*unsubscribe twice to make sure refresh operation can be safely cascaded*/
belle_sip_refresher_refresh(refresher,0);
belle_sip_refresher_refresh(refresher,0);
belle_sip_refresher_stop(refresher);
belle_sip_object_unref(refresher);
destroy_endpoint(client);
......
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