mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
retry the PUBLISH if they get a bad match (412)
This commit is contained in:
parent
30e74df86b
commit
6a033f8a64
1 changed files with 7 additions and 2 deletions
|
|
@ -26,8 +26,13 @@ static void publish_refresher_listener ( const belle_sip_refresher_t* refresher
|
|||
SalOp* op = (SalOp*)user_pointer;
|
||||
/*belle_sip_response_t* response=belle_sip_transaction_get_response(BELLE_SIP_TRANSACTION(belle_sip_refresher_get_transaction(refresher)));*/
|
||||
ms_message("Publish refresher [%i] reason [%s] for proxy [%s]",status_code,reason_phrase,sal_op_get_proxy(op));
|
||||
|
||||
|
||||
if (status_code==412){
|
||||
/*resubmit the request after removing the SIP-If-Match*/
|
||||
const belle_sip_client_transaction_t* last_publish_trans=belle_sip_refresher_get_transaction(op->refresher);
|
||||
belle_sip_request_t* last_publish=belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(last_publish_trans));
|
||||
belle_sip_message_remove_header((belle_sip_message_t*)last_publish,"SIP-If-Match");
|
||||
belle_sip_refresher_refresh(op->refresher,BELLE_SIP_REFRESHER_REUSE_EXPIRES);
|
||||
}
|
||||
}
|
||||
/*presence publish */
|
||||
int sal_publish_presence(SalOp *op, const char *from, const char *to, SalPresenceModel *presence){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue