+2004-10-05 Jeffrey Stedfast <fejj@novell.com>
+
+ * camel-service.c (camel_getaddrinfo): Check msg->result for error
+ and set an exception if appropriate.
+ (camel_getnameinfo): Same.
+
+2004-10-04 Jeffrey Stedfast <fejj@novell.com>
+
+ * camel-service.c (camel_getaddrinfo): Add a non-const cast for
+ hints when changing the ai_family member in the IPv6-disabled
+ case. Fixes bug #67028.
+
2004-10-05 Not Zed <NotZed@Ximian.com>
** See bug #67527.
2004-10-01 Jeffrey Stedfast <fejj@novell.com>
+ * providers/imap4/camel-imap4-folder.c (imap4_sync): If we aren't
+ online, we're done. nothing to do.
+ (imap4_refresh_info): Same.
+ (imap4_append_message): Same but set an exception.
+ (imap4_transfer_messages_to): Same.
+
* camel-service.c (camel_getaddrinfo): Avoid assigning a value to
the member of a const struct (which newer gcc's apparently break
over) by casting to non-const.
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
+#include <netdb.h>
#include <errno.h>
#include <sys/poll.h>
d(printf("child done\n"));
}
} else {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, "%s: %s: %s", _("cannot create thread"), g_strerror(err));
+ camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, "%s: %s: %s", error, _("cannot create thread"), g_strerror(err));
}
e_msgport_destroy(reply_port);
struct _addrinfo_msg *msg;
struct addrinfo *res = NULL;
#ifndef ENABLE_IPv6
- struct addrinfo *myhints;
+ struct addrinfo myhints;
#endif
g_return_val_if_fail(name != NULL, NULL);
/* force ipv4 addresses only */
#ifndef ENABLE_IPv6
- if (hints == NULL) {
+ if (hints == NULL)
memset(&myhints, 0, sizeof(myhints));
- hints = &myhints;
- }
-
- ((struct addrinfo *) hints)->ai_family = AF_INET;
+ else
+ memcpy (&myhints, hints, sizeof (myhints));
+
+ myhints.ai_family = AF_INET;
+ hints = &myhints;
#endif
msg = g_malloc0(sizeof(*msg));
msg->hostbuflen = 1024;
msg->hostbufmem = g_malloc(msg->hostbuflen);
#endif
- if (cs_waitinfo(cs_getaddrinfo, msg, _("Host lookup failed"), ex) == 0)
+ if (cs_waitinfo(cs_getaddrinfo, msg, _("Host lookup failed"), ex) == 0) {
+ if (msg->result != 0)
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Host lookup failed: %s: %s"),
+ name, gai_strerror (msg->result));
+
cs_freeinfo(msg);
- else
+ } else
res = NULL;
-
+
camel_operation_end(NULL);
return res;
#endif
cs_waitinfo(cs_getnameinfo, msg, _("Name lookup failed"), ex);
- result = msg->result;
+ if ((result = msg->result) != 0)
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Name lookup failed: %s"),
+ gai_strerror (result));
if (host)
*host = g_strdup(msg->host);