aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-12-18 14:02:47 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2013-12-18 14:21:02 +0200
commit34fe716c01a7eea82089a9f7a33be08a9faa6089 (patch)
tree04f81d64c479f2ec4f29808a05857ee404e153f8
parent11cd2a63ff7c474945c127e5ef45a2b7d5afdbc3 (diff)
downloadjoh-34fe716c01a7eea82089a9f7a33be08a9faa6089.tar.gz
joh-34fe716c01a7eea82089a9f7a33be08a9faa6089.tar.bz2
Upgrade grecs
* src/Makefile.am: Use AM_CPPFLAGS instead of INCLUDES * src/config.c: Fix keyword declarations. * src/error.c (grecs_print_diag): Remove. Should be restored later, perhaps.
m---------grecs0
-rw-r--r--src/Makefile.am6
-rw-r--r--src/cmdline.opt4
-rw-r--r--src/config.c34
-rw-r--r--src/error.c11
5 files changed, 23 insertions, 32 deletions
diff --git a/grecs b/grecs
-Subproject 4c1959a4848c30206de3be4b16bdf04b650daae
+Subproject fa0d6d088a1fe22b178ef2565351f15622a1d6d
diff --git a/src/Makefile.am b/src/Makefile.am
index eba27cc..bd8da11 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
# Makefile.am for JOH - Jabber over HTTP
-# Copyright (C) 2011 Sergey Poznyakoff
+# Copyright (C) 2011,2013 Sergey Poznyakoff
#
# JOH is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -64,13 +64,13 @@ johd_SOURCES = \
joh_cgi_SOURCES = \
johcgi.c
-INCLUDES = @GRECS_INCLUDES@
LDADD = ./libjoh.a @GRECS_LDADD@
AM_CPPFLAGS= \
-DSYSCONFDIR=\"$(sysconfdir)\"\
-DDEFAULT_VERSION_INCLUDE_DIR=\"$(incdir)\"\
-DDEFAULT_INCLUDE_DIR=\"$(pkgdatadir)/include\"\
- -DDEFAULT_PREPROCESSOR="$(DEFAULT_PREPROCESSOR)"
+ -DDEFAULT_PREPROCESSOR="$(DEFAULT_PREPROCESSOR)"\
+ @GRECS_INCLUDES@
SUFFIXES = .opt .h
diff --git a/src/cmdline.opt b/src/cmdline.opt
index 5098ff8..d929cf8 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -1,5 +1,5 @@
/* johd: Jabber-Over-HTTP daemon. -*- c -*-
- Copyright (C) 2011 Sergey Poznyakoff
+ Copyright (C) 2011, 2013 Sergey Poznyakoff
JOH is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -256,7 +256,7 @@ joh_version_hook(FILE *fp)
void
parse_options(int argc, char *argv[])
{
- print_version_hook = joh_version_hook;
+ proginfo.print_version_hook = joh_version_hook;
GETOPT(argc, argv, , exit(EX_USAGE))
}
diff --git a/src/config.c b/src/config.c
index 73dcd17..312bc72 100644
--- a/src/config.c
+++ b/src/config.c
@@ -48,13 +48,13 @@ 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_AGGR, &syslog_facility, 0,
+ grecs_type_string, GRECS_AGGR, &syslog_facility, 0,
cb_syslog_facility },
{ "tag", N_("string"), N_("Tag syslog messages with this string"),
- grecs_type_string, &syslog_tag },
+ grecs_type_string, GRECS_DFLT, &syslog_tag },
{ "print-priority", N_("arg"),
N_("Prefix each message with its priority"),
- grecs_type_bool, &syslog_include_prio },
+ grecs_type_bool, GRECS_DFLT, &syslog_include_prio },
{ NULL },
};
@@ -142,15 +142,15 @@ cb_class_http_redirect(enum grecs_callback_command cmd,
*/
static struct grecs_keyword class_kw[] = {
{ "type", "<arg: CGI | HTTP>", "Set class type (default: HTTP)",
- grecs_type_string|GRECS_AGGR, NULL, 0, cb_class_type },
+ grecs_type_string, GRECS_AGGR, NULL, 0, cb_class_type },
{ "service", NULL, "Service name for TCP wrappers",
- grecs_type_string|GRECS_AGGR, NULL,
+ grecs_type_string, GRECS_AGGR, NULL,
offsetof(struct joh_sockaddr_hints, srvname) },
{ "http-error-page", "file", "Read HTTP error page from <file>",
- grecs_type_string|GRECS_AGGR, NULL, 0,
+ grecs_type_string, GRECS_AGGR, NULL, 0,
cb_class_http_error_page },
{ "http-redirect", "URL", "Redirect HTTP GET requests to URL",
- grecs_type_string|GRECS_AGGR, NULL, 0,
+ grecs_type_string, GRECS_AGGR, NULL, 0,
cb_class_http_redirect },
{ NULL }
};
@@ -387,28 +387,28 @@ cb_timeout(enum grecs_callback_command cmd,
static struct grecs_keyword joh_kw[] = {
{ "debug", NULL, "Set debug level",
- grecs_type_string|GRECS_LIST, &cfg_debug_spec },
+ grecs_type_string, GRECS_LIST, &cfg_debug_spec },
{ "syslog", NULL, "Configure syslog logging",
- grecs_type_section, NULL, 0, NULL, NULL, syslog_kw },
+ grecs_type_section, GRECS_DFLT, NULL, 0, NULL, NULL, syslog_kw },
{ "line-info", NULL,
"Include source line information in debugging messages",
- grecs_type_bool, &syslog_source_info },
+ grecs_type_bool, GRECS_DFLT, &syslog_source_info },
{ "pidfile", "file", "Write PID to <file>",
- grecs_type_string, &pidfile },
+ grecs_type_string, GRECS_DFLT, &pidfile },
{ "standalone", NULL, "Standalone mode",
- grecs_type_bool, &daemon_option },
+ grecs_type_bool, GRECS_DFLT, &daemon_option },
{ "user", NULL, "Run as this user",
- grecs_type_string, &user_name },
+ grecs_type_string, GRECS_DFLT, &user_name },
{ "class", "name: string", "Define socket class",
- grecs_type_section, NULL, 0, cb_class, NULL, class_kw },
+ grecs_type_section, GRECS_DFLT, NULL, 0, cb_class, NULL, class_kw },
{ "timeout",
"session: c(lient) or j(abber)> <arg: timespec",
"Set session timeout",
- grecs_type_string|GRECS_AGGR, NULL, 0, cb_timeout },
+ grecs_type_string, GRECS_AGGR, NULL, 0, cb_timeout },
{ "listen", "url: string> <class: name", "Listen on a socket",
- grecs_type_string|GRECS_MULT, NULL, 0, cb_listen },
+ grecs_type_string, GRECS_MULT, NULL, 0, cb_listen },
{ "server", "url", "Set Jabber server URL",
- grecs_type_string, NULL, 0, cb_server },
+ grecs_type_string, GRECS_DFLT, NULL, 0, cb_server },
{ NULL }
};
diff --git a/src/error.c b/src/error.c
index 7cf0df3..ee1d38a 100644
--- a/src/error.c
+++ b/src/error.c
@@ -1,5 +1,5 @@
/* Diagnostic functions for JOH.
- Copyright (C) 2011 Sergey Poznyakoff
+ Copyright (C) 2011, 2013 Sergey Poznyakoff
JOH is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -274,15 +274,6 @@ logmsg(int severity, const char *file, unsigned line, const char *fmt, ...)
}
-void
-grecs_print_diag(grecs_locus_t *locus, int err, int errcode, const char *msg)
-{
- logmsg(err ? JOH_SEVERITY_ERROR : JOH_SEVERITY_WARN,
- locus ? locus->file : NULL, locus ? locus->line : 0,
- "%s", msg);
-}
-
-
static const char *debug_file;
static int debug_line;

Return to:

Send suggestions and report system problems to the System administrator.