use case-insensitive comparisons for headears (issue #5023)
authorKevin P. Fleming <kpfleming@digium.com>
Fri, 26 Aug 2005 20:04:28 +0000 (20:04 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Fri, 26 Aug 2005 20:04:28 +0000 (20:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6423 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index d83cac1..f56f2fe 100755 (executable)
@@ -5290,7 +5290,7 @@ static int parse_contact(struct sip_pvt *pvt, struct sip_peer *p, struct sip_req
        struct sockaddr_in oldsin;
 
        if (ast_strlen_zero(expires)) { /* No expires header */
-               expires = strstr(get_header(req, "Contact"), "expires=");
+               expires = strcasestr(get_header(req, "Contact"), "expires=");
                if (expires) {
                        if (sscanf(expires + 8, "%d;", &expiry) != 1)
                                expiry = default_expiry;
@@ -8722,7 +8722,7 @@ static int handle_response_register(struct sip_pvt *p, int resp, char *rest, str
                                } else
                                        break;
                        }
-                       tmptmp = strstr(contact, "expires=");
+                       tmptmp = strcasestr(contact, "expires=");
                        if (tmptmp) {
                                if (sscanf(tmptmp + 8, "%d;", &expires) != 1)
                                        expires = 0;