]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_sip: Don't ignore expires value in contact header if it lacks semicolon
authorJonathan Rose <jrose@digium.com>
Thu, 3 Oct 2013 22:59:04 +0000 (22:59 +0000)
committerJonathan Rose <jrose@digium.com>
Thu, 3 Oct 2013 22:59:04 +0000 (22:59 +0000)
(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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400470 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 9defb2e64004e1fbc5787865cc17c56653b8b4ab..c68e90a4b1ff325c616cacde6f6e597a28d91f5c 100644 (file)
@@ -23418,8 +23418,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;
+                               }
                        }
                        
                }