[dovecot-cvs] dovecot/src/imap main.c,1.38,1.39 common.h,1.9,1.10 client.c,1.31,1.32

cras at procontrol.fi cras at procontrol.fi
Sat Jul 26 20:54:31 EEST 2003


Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv31827

Modified Files:
	main.c common.h client.c 
Log Message:
Added hook_client_created and hook_mail_storage_created for modules.



Index: main.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- main.c	15 Jul 2003 18:26:42 -0000	1.38
+++ main.c	26 Jul 2003 16:54:29 -0000	1.39
@@ -29,6 +29,9 @@
 static struct module *modules;
 static char log_prefix[128]; /* syslog() needs this to be permanent */
 
+void (*hook_mail_storage_created)(struct mail_storage *storage) = NULL;
+void (*hook_client_created)(struct client *client) = NULL;
+
 string_t *capability_string;
 
 static void sig_quit(int signo __attr_unused__)
@@ -133,6 +136,9 @@
 				"autodetection failed (home %s)", home);
 		}
 	}
+
+	if (hook_mail_storage_created != NULL)
+		hook_mail_storage_created(storage);
 
 	str = getenv("IMAP_MAX_LINE_LENGTH");
 	imap_max_line_length = str != NULL ?

Index: common.h
===================================================================
RCS file: /home/cvs/dovecot/src/imap/common.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- common.h	15 Jul 2003 18:26:42 -0000	1.9
+++ common.h	26 Jul 2003 16:54:29 -0000	1.10
@@ -21,4 +21,7 @@
 
 extern string_t *capability_string;
 
+extern void (*hook_mail_storage_created)(struct mail_storage *storage);
+extern void (*hook_client_created)(struct client *client);
+
 #endif

Index: client.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/client.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- client.c	2 Jul 2003 00:57:24 -0000	1.31
+++ client.c	26 Jul 2003 16:54:29 -0000	1.32
@@ -70,6 +70,9 @@
 
 	i_assert(my_client == NULL);
 	my_client = client;
+
+	if (hook_client_created != NULL)
+		hook_client_created(client);
 	return client;
 }
 



More information about the dovecot-cvs mailing list