Commit 30a97f8b authored by Pekka Pessi's avatar Pekka Pessi

nua_dialog_store_peer_info() now optionally removes peer info.

If the SIP message given to nua_dialog_store_peer_info() is redirection
response, reset peer info.

darcs-hash:20060316111319-65a35-b671d2b5be74905bc5ec415393886b082eea2945.gz
parent 40f0cd3a
......@@ -127,6 +127,20 @@ void nua_dialog_store_peer_info(nua_owner_t *own,
*old = *nr;
if (sip && sip->sip_status &&
sip->sip_status->st_status >= 300 &&
sip->sip_status->st_status <= 399)
sip = NULL; /* Redirected */
if (sip == NULL) {
nr->nr_allow = NULL, su_free(own, old->nr_allow);
nr->nr_accept = NULL, su_free(own, old->nr_accept);
nr->nr_require = NULL, su_free(own, old->nr_require);
nr->nr_supported = NULL, su_free(own, old->nr_supported);
nr->nr_user_agent = NULL, su_free(own, old->nr_user_agent);
return;
}
if (sip->sip_allow) {
nr->nr_allow = sip_allow_dup(own, sip->sip_allow);
su_free(own, old->nr_allow);
......
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