From: Jonathan Rose Date: Thu, 3 Oct 2013 23:20:00 +0000 (+0000) Subject: chan_sip: Don't ignore expires value in contact header if it lacks semicolon X-Git-Tag: 13.0.0-beta1~995 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d35b5c9cb083a400aca801778f40ae389c5f0986;p=thirdparty%2Fasterisk.git 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 ........ Merged revisions 400471 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400482 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 00a2a16cbb..f94f457014 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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; + } } }