[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.06-4-gd33f543



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]