From: Tor Lillqvist Date: Thu, 15 Sep 2005 12:33:22 +0000 (+0000) Subject: Use g_ascii_str(n)casecmp() instead of str(n)casecmp(). The strings we are X-Git-Tag: upstream/3.7.4~6902 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6fe35f69876ea357e5dc1ccbefc5667dad9fcdf;p=platform%2Fupstream%2Fevolution-data-server.git Use g_ascii_str(n)casecmp() instead of str(n)casecmp(). The strings we are 2005-09-15 Tor Lillqvist * camel-http-stream.c (http_connect, http_get_statuscode): Use g_ascii_str(n)casecmp() instead of str(n)casecmp(). The strings we are comparing in these cases should be just ASCII anyway, so spell it out that we really do need ASCII casefolding only. --- diff --git a/camel/ChangeLog b/camel/ChangeLog index c7805e9..bb2b7ae 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,10 +1,11 @@ 2005-09-15 Tor Lillqvist * broken-date-parser.c (get_wday, get_month) - * camel-folder-search.c (check_header): Use g_ascii_str(n)casecmp() - instead of str(n)casecmp(). The strings we are comparing in these - cases should be just ASCII anyway, so spell it out that we really - do need ASCII casefolding only. + * camel-folder-search.c (check_header) + * camel-http-stream.c (http_connect, http_get_statuscode): Use + g_ascii_str(n)casecmp() instead of str(n)casecmp(). The strings we + are comparing in these cases should be just ASCII anyway, so spell + it out that we really do need ASCII casefolding only. * camel-debug.c: Use e_util_pthread_id() to identify threads. diff --git a/camel/camel-http-stream.c b/camel/camel-http-stream.c index 1343a58..ccaa06f 100644 --- a/camel/camel-http-stream.c +++ b/camel/camel-http-stream.c @@ -179,7 +179,7 @@ http_connect (CamelHttpStream *http, CamelURL *url) d(printf("connecting to http stream @ '%s'\n", url->host)); - if (!strcasecmp (url->protocol, "https")) { + if (!g_ascii_strcasecmp (url->protocol, "https")) { #ifdef HAVE_SSL stream = camel_tcp_stream_ssl_new (http->session, url->host, SSL_FLAGS); #endif @@ -267,7 +267,7 @@ http_get_statuscode (CamelHttpStream *http) d(printf("HTTP Status: %s\n", buffer)); /* parse the HTTP status code */ - if (!strncasecmp (buffer, "HTTP/", 5)) { + if (!g_ascii_strncasecmp (buffer, "HTTP/", 5)) { token = http_next_token (buffer); http->statuscode = camel_header_decode_int (&token); return http->statuscode;