From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31237 invoked by alias); 15 Jul 2008 15:40:30 -0000 Received: (qmail 31207 invoked by uid 9452); 15 Jul 2008 15:40:30 -0000 Date: Tue, 15 Jul 2008 15:40:00 -0000 Message-ID: <20080715154030.31192.qmail@sourceware.org> 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 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 470b80623e73e310311272fd48a0f5cacfff2125 X-Git-Newrev: d33f543aefb4e99638e5bd5568b59bde8f865c1d Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00067.txt.bz2 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 Date: Tue Jul 15 16:39:24 2008 +0100 [CMAN] Don't use logsys in config modules. Signed-off-by: Christine Caulfield ----------------------------------------------------------------------- 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 #include #include +#define SYSLOG_NAMES +#include #include #include @@ -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