summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorRiza Sulistyo <riza@teluu.com>2014-09-22 07:08:14 +0000
committerRiza Sulistyo <riza@teluu.com>2014-09-22 07:08:14 +0000
commite35a31561e00b573aca6e9c693b0271019089a1a (patch)
tree16b2d7f455171418ff14daa03fe7a0da4a47d8a9 /pjmedia
parent74e9fd84c72a87cc00e659eddb34b4f8f970a7b8 (diff)
Fixed #1791: Fixed possible crash when trying to cancel sdp negotiation upon receiving UPDATE response.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4926 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/src/pjmedia/sdp_neg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c
index 46f23a03..596362fe 100644
--- a/pjmedia/src/pjmedia/sdp_neg.c
+++ b/pjmedia/src/pjmedia/sdp_neg.c
@@ -1400,7 +1400,9 @@ PJ_DEF(pj_status_t) pjmedia_sdp_neg_cancel_offer(pjmedia_sdp_neg *neg)
neg->neg_local_sdp = neg->neg_remote_sdp = NULL;
neg->has_remote_answer = PJ_FALSE;
- if (neg->state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) {
+ if (neg->state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER &&
+ neg->active_local_sdp)
+ {
/* Increment next version number. This happens if for example
* the reinvite offer is rejected by 488. If we don't increment
* the version here, the next offer will have the same version.