diff options
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-service.c | 19 |
2 files changed, 18 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 34cf859bcd..1928d9192b 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2000-10-16 Chris Toshok <toshok@helixcode.com> + + * camel-service.c (get_path): when using the construct (flags & + CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags & + CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*) + (check_url): same. + 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (imap_disconnect): Only send diff --git a/camel/camel-service.c b/camel/camel-service.c index a2d5e8af3a..0449eb9d48 100644 --- a/camel/camel-service.c +++ b/camel/camel-service.c @@ -111,7 +111,8 @@ check_url (CamelService *service, CamelException *ex) { char *url_string; - if (service->url_flags & CAMEL_SERVICE_URL_NEED_USER && + if (((service->url_flags & CAMEL_SERVICE_URL_NEED_USER) + == CAMEL_SERVICE_URL_NEED_USER) && (service->url->user == NULL || service->url->user[0] == '\0')) { url_string = camel_url_to_string (service->url, FALSE); camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID, @@ -119,7 +120,8 @@ check_url (CamelService *service, CamelException *ex) url_string); g_free (url_string); return FALSE; - } else if (service->url_flags & CAMEL_SERVICE_URL_NEED_HOST && + } else if (((service->url_flags & CAMEL_SERVICE_URL_NEED_HOST) + == CAMEL_SERVICE_URL_NEED_HOST) && (service->url->host == NULL || service->url->host[0] == '\0')) { url_string = camel_url_to_string (service->url, FALSE); camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID, @@ -127,7 +129,8 @@ check_url (CamelService *service, CamelException *ex) url_string); g_free (url_string); return FALSE; - } else if (service->url_flags & CAMEL_SERVICE_URL_NEED_PATH && + } else if (((service->url_flags & CAMEL_SERVICE_URL_NEED_PATH) + == CAMEL_SERVICE_URL_NEED_PATH) && (service->url->path == NULL || service->url->path[0] == '\0')) { url_string = camel_url_to_string (service->url, FALSE); camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID, @@ -364,15 +367,15 @@ get_path (CamelService *service) url->host ? url->host : ""); } else { g_string_sprintfa (gpath, "/%s%s", - url->user ? url->user : "", - flags & CAMEL_SERVICE_URL_NEED_USER ? "" : "@"); + url->user ? url->user : "", + ((flags & CAMEL_SERVICE_URL_NEED_USER) == CAMEL_SERVICE_URL_NEED_USER) ? "" : "@"); } } else if (flags & CAMEL_SERVICE_URL_ALLOW_HOST) { g_string_sprintfa (gpath, "/%s%s", - flags & CAMEL_SERVICE_URL_NEED_HOST ? "" : "@", - url->host ? url->host : ""); + ((flags & CAMEL_SERVICE_URL_NEED_HOST) == CAMEL_SERVICE_URL_NEED_HOST) ? "" : "@", + url->host ? url->host : ""); } - if (flags & CAMEL_SERVICE_URL_NEED_PATH) { + if ((flags & CAMEL_SERVICE_URL_NEED_PATH) == CAMEL_SERVICE_URL_NEED_PATH) { g_string_sprintfa (gpath, "%s%s", *url->path == '/' ? "" : "/", url->path); |