[dovecot-cvs] dovecot/src/pop3 commands.c, 1.47, 1.48 common.h, 1.9, 1.10 main.c, 1.25, 1.26

cras at dovecot.org cras at dovecot.org
Sun Sep 11 13:52:04 EEST 2005


Update of /var/lib/cvs/dovecot/src/pop3
In directory talvi:/tmp/cvs-serv9605/src/pop3

Modified Files:
	commands.c common.h main.c 
Log Message:
Added pop3_reuse_xuidl setting. Patch by Chris Wakelin



Index: commands.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/commands.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- commands.c	27 Aug 2005 14:42:38 -0000	1.47
+++ commands.c	11 Sep 2005 10:52:02 -0000	1.48
@@ -514,6 +514,7 @@
 	};
 	struct var_expand_table *tab;
 	string_t *str;
+	const char *uidl;
 	int ret, found = FALSE;
 
 	tab = t_malloc(sizeof(static_tab));
@@ -558,7 +559,11 @@
 		str_truncate(str, 0);
 		str_printfa(str, ctx->message == 0 ? "%u " : "+OK %u ",
 			    ctx->mail->seq);
-		var_expand(str, uidl_format, tab);
+
+		uidl = !reuse_xuidl ? NULL :
+			mail_get_first_header(ctx->mail, "X-UIDL");
+		if (uidl == NULL)
+			var_expand(str, uidl_format, tab);
 
 		ret = client_send_line(client, "%s", str_c(str));
 		t_pop();

Index: common.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/common.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- common.h	14 May 2005 20:32:08 -0000	1.9
+++ common.h	11 Sep 2005 10:52:02 -0000	1.10
@@ -18,7 +18,7 @@
 
 extern struct ioloop *ioloop;
 extern enum client_workarounds client_workarounds;
-extern int enable_last_command, no_flag_updates;
+extern int enable_last_command, no_flag_updates, reuse_xuidl;
 extern const char *uidl_format, *logout_format;
 extern enum uidl_keys uidl_keymask;
 

Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/main.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- main.c	14 May 2005 20:32:08 -0000	1.25
+++ main.c	11 Sep 2005 10:52:02 -0000	1.26
@@ -41,6 +41,7 @@
 enum client_workarounds client_workarounds = 0;
 int enable_last_command = FALSE;
 int no_flag_updates = FALSE;
+int reuse_xuidl = FALSE;
 const char *uidl_format, *logout_format;
 enum uidl_keys uidl_keymask;
 
@@ -174,6 +175,7 @@
 	parse_workarounds();
 	enable_last_command = getenv("POP3_ENABLE_LAST") != NULL;
 	no_flag_updates = getenv("POP3_NO_FLAG_UPDATES") != NULL;
+	reuse_xuidl = getenv("POP3_REUSE_XUIDL") != NULL;
 
 	uidl_format = getenv("POP3_UIDL_FORMAT");
 	if (uidl_format == NULL)



More information about the dovecot-cvs mailing list