CVS: sylpheedclaws/sylpheed-claws/src/etpan imap-thread.c,1.1.4.60,1.1.4.61

[email protected] Tue, 26 Dec 2006 22:37:44 +0000
Newsgroups gmane.mail.sylpheed.claws.cvs
Message-ID <[email protected]>
Update of /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/etpan
In directory sunsite.dk:/tmp/cvs-serv1176/src/etpan

Modified Files:
      Tag: gtk2
	imap-thread.c 
Log Message:
2006-12-26 [colin]	2.6.1cvs76

	* src/folder.c
	* src/folderview.c
	* src/imap.c
	* src/statusbar.c
	* src/etpan/imap-thread.c
		Fix previous commit warnings
		Make statusbar update every second if total < 20
		Make IMAP APPEND faster by simplifying log		

Index: imap-thread.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/etpan/Attic/imap-thread.c,v
retrieving revision 1.1.4.60
retrieving revision 1.1.4.61
diff -u -d -r1.1.4.60 -r1.1.4.61
--- imap-thread.c	2006/12/26 21:30:48	1.1.4.60
+++ imap-thread.c	2006/12/26 22:37:41	1.1.4.61
@@ -166,7 +166,10 @@
 	if (size > 8192) {
 		log_print("IMAP4%c [APPEND data - %zd bytes]\n", direction?'>':'<', size);
 		return;
-	}
+	} else if (direction == 0 && size > 64) {
+		log_print("IMAP4%c [APPEND data - %zd bytes]\n", direction?'>':'<', size);
+		return;
+	} 
 	buf = malloc(size+1);
 	memset(buf, 0, size+1);
 	strncpy(buf, str, size);
@@ -639,6 +642,7 @@
 	clist * list;
 	
 	param = op->param;
+	result = op->result;
 
 	CHECK_IMAP();
 
@@ -646,7 +650,6 @@
 	r = mailimap_list(param->imap, param->base,
 			  param->wildcard, &list);
 	
-	result = op->result;
 	result->error = r;
 	result->list = list;
 	debug_print("imap list run - end\n");
@@ -698,7 +701,8 @@
 #endif
 	
 	param = op->param;
-	
+	result = op->result;
+
 	CHECK_IMAP();
 
 #ifdef DISABLE_LOG_DURING_LOGIN
@@ -722,7 +726,6 @@
 	mailstream_debug = old_debug;
 #endif
 	
-	result = op->result;
 	result->error = r;
 	debug_print("imap login run - end %i\n", r);
 }
@@ -846,12 +849,12 @@
 	int r;
 	
 	param = op->param;
+	result = op->result;
 
 	CHECK_IMAP();
 
 	r = mailimap_noop(param->imap);
 	
-	result = op->result;
 	result->error = r;
 	debug_print("imap noop run - end %i\n", r);
 }
@@ -893,12 +896,12 @@
 	int r;
 
 	param = op->param;
+	result = op->result;
 
 	CHECK_IMAP();
 
 	r = mailimap_starttls(param->imap);
 	
-	result = op->result;
 	result->error = r;
 	debug_print("imap starttls run - end %i\n", r);
 	
@@ -972,12 +975,12 @@
 	int r;
 	
 	param = op->param;
+	result = op->result;
 
 	CHECK_IMAP();
 
 	r = mailimap_create(param->imap, param->mb);
 	
-	result = op->result;
 	result->error = r;
 	debug_print("imap create run - end %i\n", r);
 }
@@ -1019,12 +1022,12 @@
 	int r;
 	
 	param = op->param;
+	result = op->result;
 
 	CHECK_IMAP();
 
 	r = mailimap_rename(param->imap, param->mb, param->new_name);
 	
-	result = op->result;
 	result->error = r;
 	debug_print("imap rename run - end %i\n", r);
 }
@@ -1067,12 +1070,12 @@
 	int r;
 	
 	param = op->param;
+	result = op->result;
 
 	CHECK_IMAP();
 
 	r = mailimap_delete(param->imap, param->mb);
 	
-	result = op->result;
 	result->error = r;
 	debug_print("imap delete run - end %i\n", r);
 }
@@ -1112,12 +1115,12 @@
 	int r;
 	
 	param = op->param;
+	result = op->result;
 
 	CHECK_IMAP();
 
 	r = mailimap_select(param->imap, param->mb);
 	
-	result = op->result;
 	result->error = r;
 	debug_print("imap select run - end %i\n", r);
 }
@@ -1172,12 +1175,12 @@
 	int r;
 	
 	param = op->param;
+	result = op->result;
 
 	CHECK_IMAP();
 
 	r = mailimap_examine(param->imap, param->mb);
 	
-	result = op->result;
 	result->error = r;
 	debug_print("imap examine run - end %i\n", r);
 }
@@ -1259,7 +1262,8 @@
 	clist * search_result;
 	
 	param = op->param;
-	
+	result = op->result;
+
 	CHECK_IMAP();
 
 	/* we copy the mailimap_set because freeing the key is recursive */
@@ -1346,7 +1350,6 @@
 		/* free the key (with the imapset) */
 		mailimap_search_key_free(key);
 
-		result = op->result;
 		result->error = r;
 		result->search_result = search_result;
 	}
@@ -1537,14 +1540,14 @@
 	int r;
 	
 	param = op->param;
-	
+	result = op->result;
+
 	CHECK_IMAP();
 
 	fetch_result = NULL;
 	r = imap_get_messages_list(param->imap, param->first_index,
 				   &fetch_result);
 	
-	result = op->result;
 	result->error = r;
 	result->fetch_result = fetch_result;
 	debug_print("imap fetch_uid run - end %i\n", r);
@@ -1817,7 +1820,8 @@
 	FILE * f;
 	
 	param = op->param;
-	
+	result = op->result;
+
 	CHECK_IMAP();
 
 	content = NULL;
@@ -1829,7 +1833,6 @@
 		r = imap_fetch_header(param->imap, param->msg_index,
 				      &content, &content_size);
 	
-	result = op->result;
 	result->error = r;
 	
 	if (r == MAILIMAP_NO_ERROR) {
@@ -2194,14 +2197,14 @@
 	int r;
 	
 	param = op->param;
-	
+	result = op->result;
+
 	CHECK_IMAP();
 
 	env_list = NULL;
 	r = imap_get_envelopes_list(param->imap, param->set,
 				    &env_list);
 	
-	result = op->result;
 	result->error = r;
 	result->fetch_env_result = env_list;
 	
@@ -2379,12 +2382,12 @@
 	int r;
 	
 	param = op->param;
+	result = op->result;
 
 	CHECK_IMAP();
 
 	r = mailimap_expunge(param->imap);
 	
-	result = op->result;
 	result->error = r;
 	debug_print("imap expunge run - end %i\n", r);
 }
@@ -2427,13 +2430,13 @@
 	struct mailimap_set *source = NULL, *dest = NULL;
 
 	param = op->param;
-	
+	result = op->result;
+
 	CHECK_IMAP();
 
 	r = mailimap_uidplus_uid_copy(param->imap, param->set, param->mb,
 		&val, &source, &dest);
 	
-	result = op->result;
 	result->error = r;
 	if (r == 0) {
 		result->source = source;
@@ -2494,13 +2497,13 @@
 	int r;
 	
 	param = op->param;
-	
+	result = op->result;
+
 	CHECK_IMAP();
 
 	r = mailimap_uid_store(param->imap, param->set,
 			       param->store_att_flags);
 	
-	result = op->result;
 	result->error = r;
 	
 	debug_print("imap store run - end %i\n", r);