[evolution-data-server] Fixes a crash in select - imapx.
- From: Chenthill Palanisamy <pchen src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Fixes a crash in select - imapx.
- Date: Tue, 8 Dec 2009 09:49:33 +0000 (UTC)
commit 258221634da675e183847ea4a9eb8827b181c7dc
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Tue Dec 8 01:20:45 2009 +0530
Fixes a crash in select - imapx.
camel/providers/imapx/camel-imapx-server.c | 22 +++++++++++-----------
camel/providers/imapx/camel-imapx-stream.c | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index baf5b63..fc87deb 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -280,21 +280,21 @@ imapx_uidset_add(struct _uidset_state *ss, CamelIMAPXCommand *ic, const gchar *u
ss->uids++;
- printf("uidset add '%s'\n", uid);
+ e(printf("uidset add '%s'\n", uid));
if (ss->last == 0) {
- printf(" start\n");
+ e(printf(" start\n"));
camel_imapx_command_add(ic, "%d", uidn);
ss->entries++;
ss->start = uidn;
} else {
if (ss->last != uidn-1) {
if (ss->last == ss->start) {
- printf(" ,next\n");
+ e(printf(" ,next\n"));
camel_imapx_command_add(ic, ",%d", uidn);
ss->entries++;
} else {
- printf(" :range\n");
+ e(printf(" :range\n"));
camel_imapx_command_add(ic, ":%d,%d", ss->last, uidn);
ss->entries+=2;
}
@@ -306,7 +306,7 @@ imapx_uidset_add(struct _uidset_state *ss, CamelIMAPXCommand *ic, const gchar *u
if ((ss->limit && ss->entries >= ss->limit)
|| (ss->total && ss->uids >= ss->total)) {
- printf(" done, %d entries, %d uids\n", ss->entries, ss->uids);
+ e(printf(" done, %d entries, %d uids\n", ss->entries, ss->uids));
imapx_uidset_done(ss, ic);
return 1;
}
@@ -1022,7 +1022,7 @@ imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
imapx_store->summary->namespaces = nsl;
camel_store_summary_touch ((CamelStoreSummary *) imapx_store->summary);
- }
+ }
return 0;
}
@@ -1492,7 +1492,7 @@ imapx_select(CamelIMAPXServer *is, CamelFolder *folder, CamelException *ex)
if (is->select_folder) {
while (!camel_dlist_empty(&is->active)) {
QUEUE_UNLOCK(is);
- imapx_step(is, ex);
+ sleep (1);
QUEUE_LOCK(is);
}
g_free(is->select);
@@ -1606,7 +1606,9 @@ imapx_connect(CamelIMAPXServer *is, gint ssl_mode, gint try_starttls, CamelExcep
ic = camel_imapx_command_new ("NAMESPACE", NULL, "NAMESPACE");
imapx_command_run (is, ic, ex);
camel_imapx_command_free (ic);
- } else {
+ }
+
+ if (((CamelIMAPXStore *) is->store)->summary->namespaces == NULL) {
CamelIMAPXNamespaceList *nsl = NULL;
CamelIMAPXStoreNamespace *ns = NULL;
CamelIMAPXStore *imapx_store = (CamelIMAPXStore *) is->store;
@@ -2120,6 +2122,7 @@ imapx_job_refresh_info_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
CamelIMAPXCommand *ic;
/* Should we force a select here ? */
+ //imapx_select (is, job->folder, job->ex);
ic = camel_imapx_command_new ("FETCH", job->folder->full_name,
"FETCH 1:* (UID FLAGS)");
ic->job = job;
@@ -2521,10 +2524,7 @@ camel_imapx_server_new(CamelStore *store, CamelURL *url)
is->session = ((CamelService *)store)->session;
camel_object_ref(is->session);
is->store = store;
-
is->url = camel_url_copy(url);
-// camel_url_set_user(is->url, "camel");
- camel_url_set_passwd(is->url, "novell");
return is;
}
diff --git a/camel/providers/imapx/camel-imapx-stream.c b/camel/providers/imapx/camel-imapx-stream.c
index bcc9e80..7f0977f 100644
--- a/camel/providers/imapx/camel-imapx-stream.c
+++ b/camel/providers/imapx/camel-imapx-stream.c
@@ -38,7 +38,7 @@
#include "camel-imapx-exception.h"
#define t(x)
-#define io(x)
+#define io(x)
static CamelObjectClass *parent_class = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]