Fix crash on 32-bit for users not using https
authorTerry Wilson <twilson@digium.com>
Fri, 5 Feb 2010 17:20:24 +0000 (17:20 +0000)
committerTerry Wilson <twilson@digium.com>
Fri, 5 Feb 2010 17:20:24 +0000 (17:20 +0000)
(closes issue #16778)
Reported by: pitel
Patches:
      diff.txt uploaded by twilson (license 396)
Tested by: twilson, pitel

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

res/res_calendar_caldav.c
res/res_calendar_exchange.c
res/res_calendar_icalendar.c

index d23f9a6..c7c8f2f 100644 (file)
@@ -630,7 +630,7 @@ static void *caldav_load_calendar(void *void_data)
 
        pvt->session = ne_session_create(pvt->uri.scheme, pvt->uri.host, pvt->uri.port);
        ne_set_server_auth(pvt->session, auth_credentials, pvt);
-       if (!strncasecmp(pvt->uri.scheme, "https", sizeof(pvt->uri.scheme))) {
+       if (!strcasecmp(pvt->uri.scheme, "https")) {
                ne_ssl_trust_default_ca(pvt->session);
                ne_ssl_set_verify(pvt->session, verify_cert, NULL);
        }
index 4722e6e..8bead3a 100644 (file)
@@ -694,7 +694,7 @@ static void *exchangecal_load_calendar(void *void_data)
 
        pvt->session = ne_session_create(pvt->uri.scheme, pvt->uri.host, pvt->uri.port);
        ne_set_server_auth(pvt->session, auth_credentials, pvt);
-       if (!strncasecmp(pvt->uri.scheme, "https", sizeof(pvt->uri.scheme))) {
+       if (!strcasecmp(pvt->uri.scheme, "https")) {
                ne_ssl_trust_default_ca(pvt->session);
        }
 
index 08ef8f5..44febe7 100644 (file)
@@ -413,7 +413,7 @@ static void *ical_load_calendar(void *void_data)
 
        pvt->session = ne_session_create(pvt->uri.scheme, pvt->uri.host, pvt->uri.port);
        ne_set_server_auth(pvt->session, auth_credentials, pvt);
-       if (!strncasecmp(pvt->uri.scheme, "https", sizeof(pvt->uri.scheme))) {
+       if (!strcasecmp(pvt->uri.scheme, "https")) {
                ne_ssl_trust_default_ca(pvt->session);
        }