aboutsummaryrefslogtreecommitdiffstats
path: root/camel
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
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')
-rw-r--r--camel/ChangeLog25
-rw-r--r--camel/camel-filter-search.c2
-rw-r--r--camel/camel-folder-search.c8
-rw-r--r--camel/camel-service.c13
-rw-r--r--camel/providers/imapp/camel-imapp-store.c6
5 files changed, 41 insertions, 13 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 84f649fbde..ef38f2820d 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,26 @@
+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.
+
2003-08-08 Jeffrey Stedfast <fejj@ximian.com>
* tests/message/test4.c: New test suite for the mime parser (which
@@ -38,7 +61,7 @@
class's default mime_type.
(camel_mime_part_finalize): Don't need to unref the content_type
anymore.
- (process_header): Updated to use CamelDataWrapper's mime_type
+M (process_header): Updated to use CamelDataWrapper's mime_type
field.
(camel_mime_part_set_filename): Same.
(camel_mime_part_get_filename): Same.
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index 627b7ad78b..5f9e5ebffa 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -313,7 +313,7 @@ match_all (struct _ESExp *f, int argc, struct _ESExpTerm **argv, FilterMessageSe
return e_sexp_term_eval (f, argv[0]);
r = e_sexp_result_new (f, ESEXP_RES_BOOL);
- r->value.bool = FALSE;
+ r->value.bool = TRUE;
return r;
}
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index f19ec19aa3..89fb8f1db0 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -361,8 +361,7 @@ camel_folder_search_execute_expression(CamelFolderSearch *search, const char *ex
matches = g_ptr_array_new();
/* now create a folder summary to return?? */
- if (r
- && r->type == ESEXP_RES_ARRAY_PTR) {
+ if (r->type == ESEXP_RES_ARRAY_PTR) {
d(printf("got result ...\n"));
/* we use a mempool to store the strings, packed in tight as possible, and freed together */
/* because the strings are often short (like <8 bytes long), we would be wasting appx 50%
@@ -390,15 +389,16 @@ camel_folder_search_execute_expression(CamelFolderSearch *search, const char *ex
g_ptr_array_add(matches, e_mempool_strdup(pool, g_ptr_array_index(r->value.ptrarray, i)));
}
}
- e_sexp_result_free(search->sexp, r);
/* instead of putting the mempool_hash in the structure, we keep the api clean by
putting a reference to it in a hashtable. Lets us do some debugging and catch
unfree'd results as well. */
g_hash_table_insert(p->mempool_hash, matches, pool);
} else {
- d(printf("no result!\n"));
+ g_warning("Search returned an invalid result type");
}
+ e_sexp_result_free(search->sexp, r);
+
search->folder = NULL;
search->summary = NULL;
search->current = NULL;
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);
}
diff --git a/camel/providers/imapp/camel-imapp-store.c b/camel/providers/imapp/camel-imapp-store.c
index 36dde917bb..b3c8e57352 100644
--- a/camel/providers/imapp/camel-imapp-store.c
+++ b/camel/providers/imapp/camel-imapp-store.c
@@ -861,10 +861,10 @@ imap_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelExc
CamelFolderInfo * fi= NULL;
char *name;
- if (istore->driver == NULL) {
- camel_exception_setv(ex, 1, "Not connected");
+ /* FIXME: temporary, since this is not a disco store */
+ if (istore->driver == NULL
+ && !camel_service_connect((CamelService *)store, ex))
return NULL;
- }
name = (char *)top;
if (name == NULL || name[0] == 0) {