]> 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:51:54 +0000 (22:51 +0000)
committerJonathan Rose <jrose@digium.com>
Thu, 3 Oct 2013 22:51:54 +0000 (22:51 +0000)
(closes issue ASTERISK-22574)
Reported by: Filip Jenicek
Patches:
    chan_sip_expires.patch uploaded by Filip Jenicek (license 6277)

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

channels/chan_sip.c

index f5c726fea2e936056f4a3f20b6abdcdd24297bc6..43fff0e04aa67409ad648a2db78e6003f06c318f 100644 (file)
@@ -21519,8 +21519,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;
+                               }
                        }
                        
                }