diff options
author | Liong Sauw Ming <ming@teluu.com> | 2012-03-20 09:23:20 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2012-03-20 09:23:20 +0000 |
commit | c1db7a1fc59c4b7e6ba21dd97353f4aae7e905db (patch) | |
tree | 01e0aa1abea4b5b85848a3bd9c925951aeee06f1 /pjmedia/src | |
parent | 0886b471cf68c8fefcd6549f2c7ddebb5140a069 (diff) |
Re #1428: Fix returning the correct error status when there is no active media.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3980 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src')
-rw-r--r-- | pjmedia/src/pjmedia/sdp_neg.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c index fbc88c88..09b893ef 100644 --- a/pjmedia/src/pjmedia/sdp_neg.c +++ b/pjmedia/src/pjmedia/sdp_neg.c @@ -1296,14 +1296,18 @@ static pj_status_t create_answer( pj_pool_t *pool, pj_strcmp(&om->desc.transport, &im->desc.transport)==0 && media_used[j] == 0) { + pj_status_t status2; + /* See if it has matching codec. */ - status = match_offer(pool, prefer_remote_codec_order, - om, im, initial, &am); - if (status == PJ_SUCCESS) { + status2 = match_offer(pool, prefer_remote_codec_order, + om, im, initial, &am); + if (status2 == PJ_SUCCESS) { /* Mark media as used. */ media_used[j] = 1; break; - } + } else { + status = status2; + } } } |