aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-05-15 09:00:56 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-05-15 09:00:56 +0800
commit1c3b06662248fa1279b410633df6e9087ff922a9 (patch)
tree4609691bf10257e7d2570098579107d832b1d711
parenta5d90d4a7684f4cbfdf335d5039757744631a32f (diff)
downloadgsoc2013-evolution-1c3b06662248fa1279b410633df6e9087ff922a9.tar
gsoc2013-evolution-1c3b06662248fa1279b410633df6e9087ff922a9.tar.gz
gsoc2013-evolution-1c3b06662248fa1279b410633df6e9087ff922a9.tar.bz2
gsoc2013-evolution-1c3b06662248fa1279b410633df6e9087ff922a9.tar.lz
gsoc2013-evolution-1c3b06662248fa1279b410633df6e9087ff922a9.tar.xz
gsoc2013-evolution-1c3b06662248fa1279b410633df6e9087ff922a9.tar.zst
gsoc2013-evolution-1c3b06662248fa1279b410633df6e9087ff922a9.zip
** See bug #42540
2003-05-14 Not Zed <NotZed@Ximian.com> ** See bug #42540 * camel-service.c (camel_gethostbyname): pre-initialise the error return to invalid, so if we cancel, we definetly get a bad result. Also, for a valid return against result, not herr. (camel_gethostbyaddr): Likewise. svn path=/trunk/; revision=21187
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/camel-service.c8
2 files changed, 14 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index a8d80e6f6c..c24472738a 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,12 @@
+2003-05-14 Not Zed <NotZed@Ximian.com>
+
+ ** See bug #42540
+
+ * camel-service.c (camel_gethostbyname): pre-initialise the error
+ return to invalid, so if we cancel, we definetly get a bad result.
+ Also, for a valid return against result, not herr.
+ (camel_gethostbyaddr): Likewise.
+
2003-05-13 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Added
diff --git a/camel/camel-service.c b/camel/camel-service.c
index 67d49c317f..f3d2a43572 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -744,6 +744,7 @@ camel_gethostbyname (const char *name, CamelException *ex)
msg->hostbuflen = 1024;
msg->hostbufmem = g_malloc(msg->hostbuflen);
msg->name = name;
+ msg->result = -1;
#ifdef ENABLE_THREADS
cancel_fd = camel_operation_cancel_fd(NULL);
@@ -793,7 +794,7 @@ camel_gethostbyname (const char *name, CamelException *ex)
camel_operation_end(NULL);
- if (msg->herr) {
+ if (msg->result != 0) {
if (!camel_exception_is_set(ex)) {
if (msg->herr == HOST_NOT_FOUND || msg->herr == NO_DATA)
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -858,7 +859,8 @@ camel_gethostbyaddr (const char *addr, int len, int type, CamelException *ex)
msg->name = addr;
msg->len = len;
msg->type = type;
-
+ msg->result = -1;
+
#ifdef ENABLE_THREADS
cancel_fd = camel_operation_cancel_fd (NULL);
if (cancel_fd == -1) {
@@ -908,7 +910,7 @@ camel_gethostbyaddr (const char *addr, int len, int type, CamelException *ex)
camel_operation_end (NULL);
- if (msg->herr) {
+ if (msg->result != 0) {
if (!camel_exception_is_set (ex)) {
if (msg->herr == HOST_NOT_FOUND || msg->herr == NO_DATA)
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,