aboutsummaryrefslogtreecommitdiff
path: root/src/mail.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-02-26 16:24:03 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2013-02-26 16:36:32 +0200
commit5b29f3ecc4e2edb172d50b23732a588b7a71ce62 (patch)
tree79b94cbcd5b3a5456ad2a2b2c410886b7e1fb143 /src/mail.c
parent1eeab02e9de4d54178279b347296e98fd97e2a00 (diff)
downloadwydawca-5b29f3ecc4e2edb172d50b23732a588b7a71ce62.tar.gz
wydawca-5b29f3ecc4e2edb172d50b23732a588b7a71ce62.tar.bz2
Introduce loadable modules.
* .gitignore: Update. * configure.ac: Require libtool Require Grecs tree-api. * Makefile.am: Incorporate libtool * bootstrap: Create m4 if it does not exist. * doc/Makefile.am: Use texi2html * grecs: Upgrade * src/module.c: New file. * src/Makefile.am (wydawca_SOURCES): Add module.c * src/config.c: Switch callbacks to tree-api. Add statements for working with modules: module-load-path, module-prepend-load-path and module in the global scope and module and module-config in notify-event blocks. * src/mail.c (do_notify): Call module_notify if a module is configured. * src/tcpwrap.c: Switch callbacks to tree-api. * src/wydawca.c (main): Load modules. * src/wydawca.h (notification) <modname> <modcfg,modnode>: New members. (module): New struct. (cb_module,modules_load,module_notify): New functions. (module_load_path) (module_prepend_load_path): New globals.
Diffstat (limited to 'src/mail.c')
-rw-r--r--src/mail.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mail.c b/src/mail.c
index 2b64501..dd16510 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -509,6 +509,11 @@ do_notify(struct file_triplet *trp, enum notification_event ev,
const char *errp;
const char *msg;
+ if (ntf->modname) {
+ module_notify(ntf->modname, ntf->modcfg, ev, trp);
+ return;
+ }
+
switch (ntf->tgt) {
case notify_read:
rcpt = NULL;

Return to:

Send suggestions and report system problems to the System administrator.