From 64c24236f15435ff11ae839c7d923ffc7e1f7a79 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 10 Sep 2008 16:23:44 +0000 Subject: [PATCH] Wed Sep 10 11:45:25 EDT 2008 Pekka Pessi * soa_static.c: soa_static_process_reject() backs up only if it has to back up git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9516 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 38bb14afdf..570cfc33aa 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Wed Sep 10 12:23:16 EDT 2008 +Wed Sep 10 12:23:38 EDT 2008 diff --git a/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c b/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c index 38ce8b2a1b..5fd5b60506 100644 --- a/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c +++ b/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c @@ -1473,13 +1473,17 @@ static int soa_static_process_reject(soa_session_t *ss, { struct soa_description d[1]; - *d = *ss->ss_local; - *ss->ss_local = *ss->ss_previous; - ss->ss_local_user_version = ss->ss_previous_user_version; - ss->ss_local_remote_version = ss->ss_previous_remote_version; + if (ss->ss_previous_user_version) { + *d = *ss->ss_local; + *ss->ss_local = *ss->ss_previous; + ss->ss_local_user_version = ss->ss_previous_user_version; + ss->ss_local_remote_version = ss->ss_previous_remote_version; - memset(ss->ss_previous, 0, (sizeof *ss->ss_previous)); - soa_description_free(ss, d); + memset(ss->ss_previous, 0, (sizeof *ss->ss_previous)); + soa_description_free(ss, d); + ss->ss_previous_user_version = 0; + ss->ss_previous_remote_version = 0; + } return soa_base_process_reject(ss, NULL); }