public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: ccaulfield@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, master, updated. cluster-2.99.06-4-gd33f543 Date: Tue, 15 Jul 2008 15:40:00 -0000 [thread overview] Message-ID: <20080715154030.31192.qmail@sourceware.org> (raw) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project". http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=d33f543aefb4e99638e5bd5568b59bde8f865c1d The branch, master has been updated via d33f543aefb4e99638e5bd5568b59bde8f865c1d (commit) from 470b80623e73e310311272fd48a0f5cacfff2125 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d33f543aefb4e99638e5bd5568b59bde8f865c1d Author: Christine Caulfield <ccaulfie@redhat.com> Date: Tue Jul 15 16:39:24 2008 +0100 [CMAN] Don't use logsys in config modules. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> ----------------------------------------------------------------------- Summary of changes: cman/daemon/cman-preconfig.c | 31 +++++++++++++++++++++++++++++-- 1 files changed, 29 insertions(+), 2 deletions(-) diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c index 4d9e196..7f6fc9e 100644 --- a/cman/daemon/cman-preconfig.c +++ b/cman/daemon/cman-preconfig.c @@ -9,6 +9,8 @@ #include <sys/socket.h> #include <sys/errno.h> #include <netdb.h> +#define SYSLOG_NAMES +#include <sys/syslog.h> #include <ifaddrs.h> #include <arpa/inet.h> @@ -85,6 +87,31 @@ __attribute__ ((constructor)) static void cmanpre_comp_register(void) { lcr_component_register(&cmanpre_comp_ver0); } +static char *facility_name_get (unsigned int facility) +{ + unsigned int i; + + for (i = 0; facilitynames[i].c_name != NULL; i++) { + if (facility == facilitynames[i].c_val) { + return (facilitynames[i].c_name); + } + } + return (NULL); +} + +static char *priority_name_get (unsigned int priority) +{ + unsigned int i; + + for (i = 0; prioritynames[i].c_name != NULL; i++) { + if (priority == prioritynames[i].c_val) { + return (prioritynames[i].c_name); + } + } + return (NULL); +} + + #define LOCALHOST_IPV4 "127.0.0.1" #define LOCALHOST_IPV6 "::1" @@ -711,7 +738,7 @@ static void add_cman_overrides(struct objdb_iface_ver0 *objdb) char *logstr; char *logfacility; - logfacility = logsys_facility_name_get(SYSLOGFACILITY); + logfacility = facility_name_get(SYSLOGFACILITY); logger_object_handle = find_cman_logger(objdb, object_handle); @@ -741,7 +768,7 @@ static void add_cman_overrides(struct objdb_iface_ver0 *objdb) } else { char *loglevel; - loglevel = logsys_priority_name_get(SYSLOGLEVEL); + loglevel = priority_name_get(SYSLOGLEVEL); objdb->object_key_create(logger_object_handle, "syslog_level", strlen("syslog_level"), loglevel, strlen(loglevel)+1); } hooks/post-receive -- Cluster Project
reply other threads:[~2008-07-15 15:40 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080715154030.31192.qmail@sourceware.org \ --to=ccaulfield@sourceware.org \ --cc=cluster-cvs@sources.redhat.com \ --cc=cluster-devel@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).