aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-service.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-08-12 04:41:33 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-08-12 04:41:33 +0800
commit194d3d6894709503d31d6746bfe887143eea9e57 (patch)
tree31dddfefcebae634105c37f69bdb77a3b3c13d29 /camel/camel-service.c
parentc3397634d2813c298e15e67726da303e3bff23b5 (diff)
downloadgsoc2013-evolution-194d3d6894709503d31d6746bfe887143eea9e57.tar
gsoc2013-evolution-194d3d6894709503d31d6746bfe887143eea9e57.tar.gz
gsoc2013-evolution-194d3d6894709503d31d6746bfe887143eea9e57.tar.bz2
gsoc2013-evolution-194d3d6894709503d31d6746bfe887143eea9e57.tar.lz
gsoc2013-evolution-194d3d6894709503d31d6746bfe887143eea9e57.tar.xz
gsoc2013-evolution-194d3d6894709503d31d6746bfe887143eea9e57.tar.zst
gsoc2013-evolution-194d3d6894709503d31d6746bfe887143eea9e57.zip
force connect manually so basics work.
2003-08-11 Not Zed <NotZed@Ximian.com> * providers/imapp/camel-imapp-store.c (imap_get_folder_info): force connect manually so basics work. ** See bug #45505. * camel-service.c (camel_gethostbyname): duh, pthread_create returns the error code directly, not via errno. (camel_gethostbyaddr): Same, also properly handle the failure case. 2003-08-01 Not Zed <NotZed@Ximian.com> ** See bug #47208. * camel-filter-search.c (match_all): match-all with no arguments should always return TRUE. * camel-folder-search.c (camel_folder_search_execute_expression): print a warning when we get an invalid result type & fixed a leak for that case. svn path=/trunk/; revision=22179
Diffstat (limited to 'camel/camel-service.c')
-rw-r--r--camel/camel-service.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/camel/camel-service.c b/camel/camel-service.c
index ae3a36dba4..bc4f4d8764 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -750,10 +750,11 @@ camel_gethostbyname (const char *name, CamelException *exout)
EMsgPort *reply_port;
pthread_t id;
fd_set rdset;
+ int err;
reply_port = msg->msg.reply_port = e_msgport_new();
fd = e_msgport_fd(msg->msg.reply_port);
- if (pthread_create(&id, NULL, get_hostbyname, msg) == 0) {
+ if ((err = pthread_create(&id, NULL, get_hostbyname, msg)) == 0) {
d(printf("waiting for name return/cancellation in main process\n"));
do {
FD_ZERO(&rdset);
@@ -786,7 +787,7 @@ camel_gethostbyname (const char *name, CamelException *exout)
d(printf("child done\n"));
}
} else {
- camel_exception_setv(&ex, CAMEL_EXCEPTION_SYSTEM, _("Host lookup failed: cannot create thread: %s"), g_strerror(errno));
+ camel_exception_setv(&ex, CAMEL_EXCEPTION_SYSTEM, _("Host lookup failed: cannot create thread: %s"), g_strerror(err));
}
e_msgport_destroy(reply_port);
}
@@ -873,10 +874,11 @@ camel_gethostbyaddr (const char *addr, int len, int type, CamelException *exout)
EMsgPort *reply_port;
pthread_t id;
fd_set rdset;
-
+ int err;
+
reply_port = msg->msg.reply_port = e_msgport_new ();
fd = e_msgport_fd (msg->msg.reply_port);
- if (pthread_create (&id, NULL, get_hostbyaddr, msg) == 0) {
+ if ((err = pthread_create (&id, NULL, get_hostbyaddr, msg)) == 0) {
d(printf("waiting for name return/cancellation in main process\n"));
do {
FD_ZERO(&rdset);
@@ -908,7 +910,10 @@ camel_gethostbyaddr (const char *addr, int len, int type, CamelException *exout)
pthread_join(id, NULL);
d(printf("child done\n"));
}
+ } else {
+ camel_exception_setv(&ex, CAMEL_EXCEPTION_SYSTEM, _("Host lookup failed: cannot create thread: %s"), g_strerror(err));
}
+
e_msgport_destroy (reply_port);
}