aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-10-17 07:09:35 +0800
committerChris Toshok <toshok@src.gnome.org>2000-10-17 07:09:35 +0800
commit5da3981c901271b379b80705dbd598b3965baf2d (patch)
treeae47454c1d77eafb64d26f59d641294e6fdd145f /camel
parent558571a562252639558836b9aa816020981e5d2f (diff)
downloadgsoc2013-evolution-5da3981c901271b379b80705dbd598b3965baf2d.tar.gz
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')
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-service.c19
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);