summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2014-06-13 14:53:42 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2014-06-13 14:53:42 (GMT)
commitcfdddef8393b7012db59fec4d01558189a4c2e99 (patch) (side-by-side diff)
tree1dd848451c3223965ff7876dc1f71111a57e2766
parent5131315a8153c70c7acc92a02323a47f6c563dfd (diff)
downloadwydawca-cfdddef8393b7012db59fec4d01558189a4c2e99.tar.gz
wydawca-cfdddef8393b7012db59fec4d01558189a4c2e99.tar.bz2
Bugfixes.
* modules/mailutils/mod_mailutils.c (wy_config): Initialize allocated struct mailevt with 0s. * src/module.c (conf_notification_modules): Avoid coredump if np->modnode == NULL. * grecs: Upgrade. * tests/notify-upl.at: Add a unique keyword.
Diffstat (more/less context) (ignore whitespace changes)
m---------grecs0
-rw-r--r--modules/mailutils/mod_mailutils.c2
-rw-r--r--src/module.c2
-rw-r--r--tests/notify-upl.at2
4 files changed, 3 insertions, 3 deletions
diff --git a/grecs b/grecs
-Subproject 57a00b140954a2c22ba2fdebc93e8e6eda41b2a
+Subproject 477701c059d73e47aa1bac97e96d801542f2bd8
diff --git a/modules/mailutils/mod_mailutils.c b/modules/mailutils/mod_mailutils.c
index ae437ff..f705168 100644
--- a/modules/mailutils/mod_mailutils.c
+++ b/modules/mailutils/mod_mailutils.c
@@ -596,7 +596,7 @@ void *
wy_config(grecs_node_t *node)
{
int i;
- struct mailevt *evt = grecs_malloc(sizeof(*evt));
+ struct mailevt *evt = grecs_zalloc(sizeof(*evt));
for (i = 0; notify_event_kw[i].ident; i++)
notify_event_kw[i].varptr = evt;
diff --git a/src/module.c b/src/module.c
index 33946ee..ca1d471 100644
--- a/src/module.c
+++ b/src/module.c
@@ -147,7 +147,7 @@ conf_notification_modules(struct notification *np)
np->modname);
return 1;
}
- if (!np->modcfg && mod->config) {
+ if (!np->modcfg && mod->config && np->modnode) {
np->modcfg = mod->config(np->modnode);
if (!np->modcfg) {
wy_log(LOG_ERR,
diff --git a/tests/notify-upl.at b/tests/notify-upl.at
index 2c60c90..ab69e4f 100644
--- a/tests/notify-upl.at
+++ b/tests/notify-upl.at
@@ -15,7 +15,7 @@
# along with Wydawca. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([Simple upload and notification])
-AT_KEYWORDS([notify])
+AT_KEYWORDS([notify notify-upl])
AT_DATA([errtmpl],
[wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started

Return to:

Send suggestions and report system problems to the System administrator.