summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@gnu.org.ua>2013-03-11 21:52:43 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2013-03-11 21:52:43 (GMT)
commit7c10eca883faa5dd5b01bf1e50b04abb792a6639 (patch) (side-by-side diff)
tree51fc8746681d42bca8034f88510ff7f144215e70 /src
parent10a5f20232d2a57beb0a50b38b1d7196a7f5236e (diff)
downloadwydawca-7c10eca883faa5dd5b01bf1e50b04abb792a6639.tar.gz
wydawca-7c10eca883faa5dd5b01bf1e50b04abb792a6639.tar.bz2
Follow up to 87602f54.
Fix minor bugs. Update the testsuite. All tests pass now. * modules/mailutils/mod_mailutils.c (cb_statistics): Remove. Use wy_cb_statistics. (expand_email_admin, expand_email_owner): Add missing functions. * src/config.c (wy_cb_statistics): New function. (wydawca_kw): Restore "statistics" statement. * src/dictionary.c (dictionary_lookup): Fix debug levels. * src/wydawca.h (wy_cb_statistics): New proto. * tests/atlocal.in (wydawca_expandmeta): Expand @WD_MODDIR@ * tests/check-notify.at: Create notify.rc from notify.rcin * tests/notify-upl.at: Likewise. * tests/mailstats.at: Likewise. * tests/upload-dry.at: Fix the expected output. * tests/etc/mailstats.rc: Rename to tests/etc/mailstats.rcin. * tests/etc/notify.rc: Rename to tests/etc/notify.rcin. * tests/etc/Makefile.am: Update. * tests/etc/wydawca.rcin: Update to the new syntax.
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/config.c10
-rw-r--r--src/dictionary.c4
-rw-r--r--src/wydawca.h3
3 files changed, 15 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c
index 8dbc788..b89beff 100644
--- a/src/config.c
+++ b/src/config.c
@@ -440,6 +440,13 @@ parse_statmask(grecs_locus_t *loc, grecs_value_t *val, unsigned long *pmask)
return err;
}
+int
+wy_cb_statistics(enum grecs_callback_command cmd, grecs_node_t *node,
+ void *varptr, void *cb_data)
+{
+ return parse_statmask(&node->locus, node->v.value, varptr);
+}
+
static int
cb_sql_host(enum grecs_callback_command cmd, grecs_node_t *node,
@@ -1294,6 +1301,9 @@ static struct grecs_keyword wydawca_kw[] = {
N_("Control implicit signature archivation"),
grecs_type_bool, GRECS_DFLT, &archive_signatures },
+ { "statistics", N_("items"), N_("Print these stats at the end of run"),
+ grecs_type_string, GRECS_DFLT, &print_stats, 0, wy_cb_statistics },
+
{ "sql", N_("id: string"), N_("Define SQL database"),
grecs_type_section, GRECS_DFLT, NULL, 0, cb_sql, NULL, sql_kw },
diff --git a/src/dictionary.c b/src/dictionary.c
index 4f18267..0b96543 100644
--- a/src/dictionary.c
+++ b/src/dictionary.c
@@ -129,10 +129,10 @@ dictionary_lookup(struct dictionary *dict, void *handle, const char *cmd)
struct dictionary_descr *mp = dictionary_tab + dict->type;
if (cmd)
- wy_debug(1, (_("dictionary lookup: %s \"%s\""),
+ wy_debug(2, (_("dictionary lookup: %s \"%s\""),
mp->name, cmd));
else
- wy_debug(1, (_("dictionary lookup: %s"),
+ wy_debug(2, (_("dictionary lookup: %s"),
mp->name));
if (!dict->init_passed) {
diff --git a/src/wydawca.h b/src/wydawca.h
index 89d0458..08126ac 100644
--- a/src/wydawca.h
+++ b/src/wydawca.h
@@ -275,6 +275,9 @@ enum wydawca_stat {
#define STAT_MASK(c) (1<<(c))
#define STAT_MASK_NONE 0
#define STAT_MASK_ALL (STAT_MASK(MAX_STAT) - 1)
+
+int wy_cb_statistics(enum grecs_callback_command cmd, grecs_node_t *node,
+ void *varptr, void *cb_data);
enum notification_event {
ev_success,

Return to:

Send suggestions and report system problems to the System administrator.