diff src/pop3/main.c @ 14220:771fab474b1c

pop3: Added module contexts to struct client, and made client_destroy() a virtual method.
author Timo Sirainen <tss@iki.fi>
date Mon, 27 Feb 2012 10:32:03 +0200
parents ba770cba5598
children fbb1ecb9b888
line wrap: on
line diff
--- a/src/pop3/main.c	Mon Feb 27 10:30:57 2012 +0200
+++ b/src/pop3/main.c	Mon Feb 27 10:32:03 2012 +0200
@@ -29,7 +29,16 @@
 static struct mail_storage_service_ctx *storage_service;
 static struct master_login *master_login = NULL;
 
-void (*hook_client_created)(struct client **client) = NULL;
+pop3_client_created_func_t *hook_client_created = NULL;
+
+pop3_client_created_func_t *
+pop3_client_created_hook_set(pop3_client_created_func_t *new_hook)
+{
+	pop3_client_created_func_t *old_hook = hook_client_created;
+
+	hook_client_created = new_hook;
+	return old_hook;
+}
 
 void pop3_refresh_proctitle(void)
 {