aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,