[dovecot-cvs] dovecot/src/pop3 client.c,1.12,1.13 common.h,1.1,1.2 main.c,1.7,1.8

cras at procontrol.fi cras at procontrol.fi
Sat Jul 26 22:29:04 EEST 2003


Update of /home/cvs/dovecot/src/pop3
In directory danu:/tmp/cvs-serv22992/pop3

Modified Files:
	client.c common.h main.c 
Log Message:
Added pop3 hooks



Index: client.c
===================================================================
RCS file: /home/cvs/dovecot/src/pop3/client.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- client.c	26 Jul 2003 16:33:22 -0000	1.12
+++ client.c	26 Jul 2003 18:29:02 -0000	1.13
@@ -139,6 +139,8 @@
 	i_assert(my_client == NULL);
 	my_client = client;
 
+	if (hook_client_created != NULL)
+		hook_client_created(&client);
 	return client;
 }
 

Index: common.h
===================================================================
RCS file: /home/cvs/dovecot/src/pop3/common.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- common.h	27 Jan 2003 05:45:47 -0000	1.1
+++ common.h	26 Jul 2003 18:29:02 -0000	1.2
@@ -10,4 +10,7 @@
 
 extern struct ioloop *ioloop;
 
+extern void (*hook_mail_storage_created)(struct mail_storage **storage);
+extern void (*hook_client_created)(struct client **client);
+
 #endif

Index: main.c
===================================================================
RCS file: /home/cvs/dovecot/src/pop3/main.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- main.c	15 Jul 2003 09:44:56 -0000	1.7
+++ main.c	26 Jul 2003 18:29:02 -0000	1.8
@@ -18,6 +18,9 @@
 
 struct ioloop *ioloop;
 
+void (*hook_mail_storage_created)(struct mail_storage **storage) = NULL;
+void (*hook_client_created)(struct client **client) = NULL;
+
 static struct module *modules;
 static char log_prefix[128]; /* syslog() needs this to be permanent */
 
@@ -103,6 +106,9 @@
 				"autodetection failed (home %s)", home);
 		}
 	}
+
+	if (hook_mail_storage_created != NULL)
+		hook_mail_storage_created(&storage);
 
 	return client_create(0, 1, storage) != NULL;
 }



More information about the dovecot-cvs mailing list