chan_sip: Don't ignore expires value in contact header if it lacks semicolon

(closes issue ASTERISK-22574)
Reported by: Filip Jenicek
Patches:
    chan_sip_expires.patch uploaded by Filip Jenicek (license 6277)
........

Merged revisions 400469 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 400470 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jonathan Rose
2013-10-03 23:11:24 +00:00
parent 19df630819
commit 624dbb74a5

View File

@@ -23911,8 +23911,9 @@ static int handle_response_register(struct sip_pvt *p, int resp, const char *res
}
tmptmp = strcasestr(contact, "expires=");
if (tmptmp) {
if (sscanf(tmptmp + 8, "%30d;", &expires) != 1)
if (sscanf(tmptmp + 8, "%30d", &expires) != 1) {
expires = 0;
}
}
}