summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@gnu.org.ua>2012-04-23 13:08:02 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2012-04-23 13:08:02 (GMT)
commit5fc301baf79e9cc19b1bc8e7a5940e060611e349 (patch) (side-by-side diff)
tree2abb94f51bfdbe702ab0b67aa3d8ffc5ccd7e203 /src
parentf8f8ad5f57d54bbec22e7850a15707421dadb13b (diff)
downloadwydawca-5fc301baf79e9cc19b1bc8e7a5940e060611e349.tar.gz
wydawca-5fc301baf79e9cc19b1bc8e7a5940e060611e349.tar.bz2
Bugfixes.
* configure.ac: Use AC_SYS_LARGEFILE. * grecs: Upgrade. * src/wydawca.c (main): Check GPGME version.
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/wydawca.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/wydawca.c b/src/wydawca.c
index a71a04e..12f04de 100644
--- a/src/wydawca.c
+++ b/src/wydawca.c
@@ -329,6 +329,7 @@ int
main (int argc, char **argv)
{
struct grecs_node *tree;
+ const char *p;
program_name = argv[0];
mu_register_all_mailer_formats ();
@@ -341,12 +342,21 @@ main (int argc, char **argv)
argv += optind;
argc -= optind;
+ p = gpgme_check_version ("1.2.0");
+ if (!p)
+ {
+ logmsg (LOG_CRIT, _("GPGMe version check failed"));
+ exit (EX_UNAVAILABLE);
+ }
+ else if (debug_level > 3)
+ logmsg (LOG_DEBUG, _("using GPGME version %s"), p);
+
if (argc)
collect_uids (argc, argv);
if (preprocess_only)
exit (grecs_preproc_run (conffile, grecs_preprocessor) ? EX_CONFIG : 0);
-
+
tree = grecs_parse (conffile);
if (!tree)
exit (EX_CONFIG);
@@ -370,12 +380,15 @@ main (int argc, char **argv)
log_to_stderr = (!daemon_mode || foreground) && isatty (0);
grecs_log_to_stderr = log_to_stderr;
+ mu_log_tag = syslog_tag;
+ mu_log_facility = log_facility;
if (!log_to_stderr)
{
openlog (syslog_tag, LOG_PID, log_facility);
log_printer = syslog_printer;
- mu_stdstream_strerr_setup (MU_STRERR_SYSLOG);
}
+ mu_stdstream_strerr_setup (log_to_stderr ?
+ MU_STRERR_STDERR : MU_STRERR_SYSLOG);
if (getgid () == 0)
{

Return to:

Send suggestions and report system problems to the System administrator.