diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2019-07-16 09:29:48 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2019-07-16 09:29:48 +0300 |
commit | 4549c2d6d9f7533541eb9ee4f4cf3190b94565f7 (patch) | |
tree | 098fea3310f5a442d03b3ae04380f88a5275edfd /src | |
parent | 48298a6a531c0b5c292cdd565dd7e02484998b3c (diff) | |
download | wydawca-4549c2d6d9f7533541eb9ee4f4cf3190b94565f7.tar.gz wydawca-4549c2d6d9f7533541eb9ee4f4cf3190b94565f7.tar.bz2 |
Bugfix
* src/config.c: Use GRECS_CONST with string types.
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/config.c b/src/config.c index 8e94b8e..6342f2f 100644 --- a/src/config.c +++ b/src/config.c @@ -529,28 +529,28 @@ cb_sql(enum grecs_callback_command cmd, grecs_node_t *node, static struct grecs_keyword sql_kw[] = { { "config-file", N_("file"), N_("Read MySQL configuration from <file>"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct sqlconn, config_file) }, { "config-group", N_("name"), N_("Read the named group from the SQL configuration file"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct sqlconn, config_group) }, { "host", N_("host"), N_("Set SQL server hostname or IP address"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, 0, cb_sql_host }, { "database", N_("dbname"), N_("Set database name"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct sqlconn, database), }, { "user", N_("name"), N_("Set SQL user name"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct sqlconn, user) }, { "password", N_("arg"), N_("Set SQL user password"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct sqlconn, password) }, { "ssl-ca", N_("file"), N_("File name of the Certificate Authority (CA) certificate"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct sqlconn, cacert) }, { NULL } }; @@ -582,14 +582,14 @@ static struct grecs_keyword syslog_kw[] = { N_("Set syslog facility. Arg is one of the following: user, daemon, " "auth, authpriv, mail, cron, local0 through local7 " "(case-insensitive), or a facility number."), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, &wy_log_facility, 0, cb_syslog_facility }, { "tag", N_("string"), N_("Tag syslog messages with this string"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, &wy_syslog_tag }, { "print-priority", N_("arg"), N_("Prefix each message with its priority"), - grecs_type_bool, GRECS_DFLT, + grecs_type_bool, GRECS_CONST, &syslog_include_prio }, { NULL }, }; @@ -643,11 +643,11 @@ cb_backup(enum grecs_callback_command cmd, grecs_node_t *node, static struct grecs_keyword archive_kw[] = { { "name", N_("file-or-dir"), N_("Name of archive file or directory"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct archive_descr, name) }, { "backup", N_("type"), N_("Define backup type"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct archive_descr, backup_type), cb_backup }, { NULL } @@ -738,18 +738,18 @@ cb_statistics(enum grecs_callback_command cmd, grecs_node_t *node, static struct grecs_keyword notify_event_kw[] = { { "event", N_("ev-id"), N_("Event on which to notify"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct notification, ev), cb_event }, { "module", N_("name"), N_("Name of the module to invoke on event"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct notification, modname) }, { "module-config", NULL, N_("Module-specific configuration data"), grecs_type_section, GRECS_INAC, NULL, 0, NULL, NULL, NULL }, { "statistics", N_("items"), N_("Send mail if one or more of these items are set"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct notification, statmask), cb_statistics }, { NULL } @@ -867,11 +867,11 @@ cb_dictionary_params(enum grecs_callback_command cmd, grecs_node_t *node, static struct grecs_keyword dictionary_kw[] = { { "type", N_("type"), N_("Dictionary type"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct dictionary, type), cb_dictionary_type }, { "query", N_("string"), N_("Query template"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct dictionary, query) }, { "params", N_("arg"), N_("Set dictionary parameters"), grecs_type_string, GRECS_LIST, @@ -976,20 +976,20 @@ cb_url(enum grecs_callback_command cmd, grecs_node_t *node, static struct grecs_keyword spool_kw[] = { { "url", N_("arg"), N_("URL corresponding to this spool"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct spool, url) }, { "alias", N_("arg"), N_("Aliases"), grecs_type_string, GRECS_LIST, NULL, offsetof(struct spool, aliases) }, { "source", N_("dir"), N_("Source directory"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct spool, source_dir) }, { "destination", N_("dir"), N_("Destination directory"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct spool, dest_url), cb_url }, { "file-sweep-time", N_("interval"), N_("Define file sweep time"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct spool, file_sweep_time), cb_interval }, { "inotify", NULL, N_("Enable or disable inotify for this spool"), @@ -1009,7 +1009,7 @@ static struct grecs_keyword spool_kw[] = { NULL, offsetof(struct spool, notification), cb_notify_event, NULL, notify_event_kw }, { "check-script", NULL, N_("A /bin/sh script to verify the tarball"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, NULL, offsetof(struct spool, check_script) }, { NULL } }; @@ -1170,11 +1170,11 @@ static struct grecs_keyword locking_kw[] = { { "enable", NULL, N_("Enable or disable locking"), grecs_type_bool, GRECS_DFLT, &enable_locking }, { "directory", N_("dir"), N_("Set directory for lock files"), - grecs_type_string, GRECS_DFLT, &lockdir }, + grecs_type_string, GRECS_CONST, &lockdir }, { "expire-time", N_("interval"), N_("Define lock expiration interval"), - grecs_type_string, GRECS_DFLT, &lock_expire_time, 0, cb_interval }, + grecs_type_string, GRECS_CONST, &lock_expire_time, 0, cb_interval }, { "timeout", N_("interval"), N_("Locking timeout"), - grecs_type_string, GRECS_DFLT, &lock_timeout, 0, cb_interval }, + grecs_type_string, GRECS_CONST, &lock_timeout, 0, cb_interval }, { NULL } }; @@ -1276,9 +1276,9 @@ static struct grecs_keyword wydawca_kw[] = { { "single-process", NULL, N_("Do not spawn subprocesses"), grecs_type_bool, GRECS_DFLT, &single_process }, { "wakeup-interval", N_("time"), N_("Set wake-up interval"), - grecs_type_string, GRECS_DFLT, &wakeup_interval, 0, cb_interval }, + grecs_type_string, GRECS_CONST, &wakeup_interval, 0, cb_interval }, { "pidfile", N_("file"), N_("Set pid file name"), - grecs_type_string, GRECS_DFLT, &pidfile }, + grecs_type_string, GRECS_CONST, &pidfile }, { "module-prepend-load-path", N_("path"), N_("List of directories searched for modules prior to " @@ -1301,17 +1301,17 @@ static struct grecs_keyword wydawca_kw[] = { grecs_type_bool, GRECS_DFLT, &inotify_enable }, { "user", N_("name"), N_("Run with UID and GID of this user"), - grecs_type_string, GRECS_DFLT, NULL, 0, cb_user }, + grecs_type_string, GRECS_CONST, NULL, 0, cb_user }, { "group", NULL, N_("Retain these supplementary groups"), grecs_type_string, GRECS_LIST, NULL, 0, cb_supp_groups }, { "min-version", N_("major.minor"), N_("Set minimal allowed directive file version"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, &min_directive_version, 0, cb_upload_version }, { "max-version", N_("major.minor"), N_("Set maximal allowed directive file version"), - grecs_type_string, GRECS_DFLT, + grecs_type_string, GRECS_CONST, &max_directive_version, 0, cb_upload_version }, { "locking", NULL, N_("Configure locking"), @@ -1329,20 +1329,20 @@ static struct grecs_keyword wydawca_kw[] = { /* FIXME: Must be a built-in type? */ { "file-sweep-time", N_("interval"), N_("Define file sweep time"), - grecs_type_string, GRECS_DFLT, &file_sweep_time, 0, cb_interval }, + grecs_type_string, GRECS_CONST, &file_sweep_time, 0, cb_interval }, { "tar-program", N_("prog"), N_("Set tar invocation command line"), - grecs_type_string, GRECS_DFLT, &tar_command_name, 0, + grecs_type_string, GRECS_CONST, &tar_command_name, 0, cb_absolute_name }, { "umask", N_("mask: octal"), N_("Set umask"), - grecs_type_string, GRECS_DFLT, NULL, 0, cb_set_umask }, + grecs_type_string, GRECS_CONST, NULL, 0, cb_set_umask }, { "archive-signatures", NULL, 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 }, + grecs_type_string, GRECS_CONST, &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 }, @@ -1363,7 +1363,7 @@ static struct grecs_keyword wydawca_kw[] = { cb_dictionary, NULL, dictionary_kw }, { "check-script", NULL, N_("A /bin/sh script to verify tarballs"), - grecs_type_string, GRECS_DFLT, &default_check_script }, + grecs_type_string, GRECS_CONST, &default_check_script }, { "spool", N_("tag: string"), N_("Define distribution spool"), grecs_type_section, GRECS_DFLT, NULL, 0, @@ -1374,7 +1374,7 @@ static struct grecs_keyword wydawca_kw[] = { grecs_type_string, GRECS_LIST, &all_spool_aliases }, { "gpg-homedir", NULL, N_("GPG home directory"), - grecs_type_string, GRECS_DFLT, &wy_gpg_homedir }, + grecs_type_string, GRECS_CONST, &wy_gpg_homedir }, {NULL} }; |