Fix my previous fix

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Martin Pycko 2003-03-31 16:26:37 +00:00
parent 7bc99b0135
commit 7f1005e793
1 changed files with 3 additions and 3 deletions

View File

@ -1493,14 +1493,14 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
ast_rtp_pt_clear(p->rtp);
codecs = m + len;
while(strlen(codecs)) {
if (sscanf(codecs, "%d %n", &codec, &len) != 1) {
if (sscanf(codecs, "%d%n", &codec, &len) != 1) {
ast_log(LOG_WARNING, "Error in codec string '%s'\n", codecs);
return -1;
}
ast_rtp_set_m_type(p->rtp, codec);
codecs += len;
/* Fix going to: a=rtpmap:0 PCMU/8000 line */
if ( (int)(strlen(m)-(int)(codecs-m)) < 0 ) break;
/* Skip over any whitespace */
while(*codecs && (*codecs < 33)) codecs++;
}
// Next, scan through each "a=rtpmap:" line, noting each