diff options
author | Chris Toshok <toshok@helixcode.com> | 2000-10-17 07:09:35 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2000-10-17 07:09:35 +0800 |
commit | 5da3981c901271b379b80705dbd598b3965baf2d (patch) | |
tree | ae47454c1d77eafb64d26f59d641294e6fdd145f /camel/camel-service.c | |
parent | 558571a562252639558836b9aa816020981e5d2f (diff) | |
download | gsoc2013-evolution-5da3981c901271b379b80705dbd598b3965baf2d.tar gsoc2013-evolution-5da3981c901271b379b80705dbd598b3965baf2d.tar.gz gsoc2013-evolution-5da3981c901271b379b80705dbd598b3965baf2d.tar.bz2 gsoc2013-evolution-5da3981c901271b379b80705dbd598b3965baf2d.tar.lz gsoc2013-evolution-5da3981c901271b379b80705dbd598b3965baf2d.tar.xz gsoc2013-evolution-5da3981c901271b379b80705dbd598b3965baf2d.tar.zst gsoc2013-evolution-5da3981c901271b379b80705dbd598b3965baf2d.zip |
when using the construct (flags & CAMEL_SERVICE_URL_NEED_*) make sure to
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.
svn path=/trunk/; revision=5951
Diffstat (limited to 'camel/camel-service.c')
-rw-r--r-- | camel/camel-service.c | 19 |
1 files changed, 11 insertions, 8 deletions
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); |