From e7e08fc3b6b09d3dba5dce0307dfc0dbad5f9aef Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 22 Sep 2006 16:55:42 +0000 Subject: Fixed few bugs that seem to have been introduced by new dialog locking algorithm: - Fixed crash in PJSUA-API when initiating client subscription - Fixed another crash in PJSUA-API when hanging-up call Also fixed SDP negotiator: - add a=inactive when rejecting media line Also increase maximum log size from 1500 to 2000 since some SIP packet is quite large. A little bit of Warning: ** THIS MAY AFFECT APPLICATION'S STACK USAGE ** git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@734 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/src/pjmedia/sdp_neg.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'pjmedia/src') diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c index 5ce44164..8b362ba9 100644 --- a/pjmedia/src/pjmedia/sdp_neg.c +++ b/pjmedia/src/pjmedia/sdp_neg.c @@ -894,6 +894,8 @@ static pj_status_t create_answer( pj_pool_t *pool, /* No matching media. * Reject the offer by setting the port to zero in the answer. */ + pjmedia_sdp_attr *a; + /* For simplicity in the construction of the answer, we'll * just clone the media from the offer. Anyway receiver will * ignore anything in the media once it sees that the port @@ -902,8 +904,11 @@ static pj_status_t create_answer( pj_pool_t *pool, am = pjmedia_sdp_media_clone(pool, om); am->desc.port = 0; - /* Match direction */ - update_media_direction(pool, om, am); + /* Remove direction attribute, and replace with inactive */ + remove_all_media_directions(am); + + a = pjmedia_sdp_attr_create(pool, "inactive", NULL); + pjmedia_sdp_media_add_attr(am, a); } else { /* The answer is in am */ -- cgit v1.2.3