From c2affa0f720d9ae4d515d29c4c57ec4f0bf792fa Mon Sep 17 00:00:00 2001 From: Jonathan Rose Date: Thu, 3 Oct 2013 22:51:54 +0000 Subject: [PATCH] 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) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@400469 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f5c726fea2..43fff0e04a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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; + } } } -- 2.47.3