rpms/openais/devel revision-1568.patch, NONE, 1.1 revision-1569.patch, NONE, 1.1 revision-1570.patch, NONE, 1.1 revision-1571.patch, NONE, 1.1 revision-1572.patch, NONE, 1.1 revision-1573.patch, NONE, 1.1 revision-1574.patch, NONE, 1.1 revision-1575.patch, NONE, 1.1 revision-1576.patch, NONE, 1.1 revision-1579.patch, NONE, 1.1 openais.spec, 1.27, 1.28

Fabio M. Di Nitto (fabbione) fedora-extras-commits at redhat.com
Mon Jul 14 11:41:30 UTC 2008


Author: fabbione

Update of /cvs/pkgs/rpms/openais/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30901

Modified Files:
	openais.spec 
Added Files:
	revision-1568.patch revision-1569.patch revision-1570.patch 
	revision-1571.patch revision-1572.patch revision-1573.patch 
	revision-1574.patch revision-1575.patch revision-1576.patch 
	revision-1579.patch 
Log Message:
Update to trunk revision 1579.


revision-1568.patch:

--- NEW FILE revision-1568.patch ---
Index: exec/mainconfig.c
===================================================================
--- exec/mainconfig.c	(revision 1567)
+++ exec/mainconfig.c	(revision 1568)
@@ -208,7 +208,7 @@
 					logsys_logger.priority = LOG_LEVEL_DEBUG;
 				} else
 				if (strcmp (value, "off") == 0) {
-					logsys_logger.priority &= ~LOG_LEVEL_DEBUG;
+					logsys_logger.priority = LOG_LEVEL_INFO;
 				} else {
 					goto parse_error;
 				}
@@ -217,7 +217,13 @@
 				if (global_debug)
 					logsys_logger.priority = LOG_LEVEL_DEBUG;
 			}
-
+			if (logsys_logger.priority != LOG_LEVEL_DEBUG) {
+				if (!objdb_get_string (objdb, object_logger_subsys_handle, "syslog_level", &value)) {
+					logsys_logger.priority = logsys_priority_id_get(value);
+					if (logsys_logger.priority < 0)
+						logsys_logger.priority = LOG_LEVEL_INFO;
+				}
+			}
 			if (!objdb_get_string (objdb, object_logger_subsys_handle, "tags", &value)) {
 				char *token = strtok (value, "|");
 
Index: man/openais.conf.5
===================================================================
--- man/openais.conf.5	(revision 1567)
+++ man/openais.conf.5	(revision 1568)
@@ -495,6 +495,13 @@
 The default is off.
 
 .TP
+syslog_level
+This specifies the syslog level for this particular subsystem. Ignored if debug is on.
+Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
+
+The default is: info.
+
+.TP
 tags
 This specifies which tags should be traced for this particular logger.
 Set debug directive to

revision-1569.patch:

--- NEW FILE revision-1569.patch ---
Index: exec/confdb.c
===================================================================
--- exec/confdb.c	(revision 1568)
+++ exec/confdb.c	(revision 1569)
@@ -455,7 +455,7 @@
 {
 	struct res_lib_confdb_write res_lib_confdb_write;
 	int ret = SA_AIS_OK;
-	char *error_string;
+	char *error_string = NULL;
 
 	if (global_objdb->object_write_config(&error_string))
 		ret = SA_AIS_ERR_ACCESS;
@@ -463,8 +463,11 @@
 	res_lib_confdb_write.header.size = sizeof(res_lib_confdb_write);
 	res_lib_confdb_write.header.id = MESSAGE_RES_CONFDB_WRITE;
 	res_lib_confdb_write.header.error = ret;
-	strcpy((char *)res_lib_confdb_write.error.value, error_string);
-	res_lib_confdb_write.error.length = strlen(error_string) + 1;
+	if (error_string) {
+		strcpy((char *)res_lib_confdb_write.error.value, error_string);
+		res_lib_confdb_write.error.length = strlen(error_string) + 1;
+	} else
+		res_lib_confdb_write.error.length = 0;
 
 	openais_conn_send_response(conn, &res_lib_confdb_write, sizeof(res_lib_confdb_write));
 }
Index: lib/confdb.c
===================================================================
--- lib/confdb.c	(revision 1568)
+++ lib/confdb.c	(revision 1569)
@@ -1130,7 +1130,8 @@
 	}
 
 	error = res_lib_confdb_write.header.error;
-	memcpy(error_text, res_lib_confdb_write.error.value, res_lib_confdb_write.error.length);
+	if (res_lib_confdb_write.error.length)
+		memcpy(error_text, res_lib_confdb_write.error.value, res_lib_confdb_write.error.length);
 
 error_exit:
 	saHandleInstancePut (&confdb_handle_t_db, handle);

revision-1570.patch:

--- NEW FILE revision-1570.patch ---
Index: exec/logsys.c
===================================================================
--- exec/logsys.c	(revision 1569)
+++ exec/logsys.c	(revision 1570)
@@ -69,8 +69,6 @@
 
 static int logsys_facility = LOG_DAEMON;
 
-static int logsys_nosubsys = 0;
-
 static int logsys_wthread_active = 0;
 
 static pthread_mutex_t logsys_config_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -121,7 +119,7 @@
 
 void _logsys_nosubsys_set (void)
 {
-	logsys_nosubsys = 1;
+	logsys_mode |= LOG_MODE_NOSUBSYS;
 }
 
 int logsys_facility_id_get (const char *name)
@@ -298,6 +296,7 @@
 	char newstring[4096];
 	char log_string[4096];
 	char char_time[512];
+	char *p = NULL;
 	struct timeval tv;
 	int i = 0;
 	int len;
@@ -331,9 +330,14 @@
 	}
 
 	if ((priority == LOG_LEVEL_DEBUG) || (logsys_mode & LOG_MODE_DISPLAY_FILELINE)) {
+		if (logsys_mode & LOG_MODE_SHORT_FILELINE) {
+			p = strrchr(file, '/');
+			if (p) 
+				file = ++p;
+		}
 		sprintf (&newstring[i], "[%s:%04u] %s", file, line, format);
 	} else {	
-		if (logsys_nosubsys == 1) {
+		if (logsys_mode & LOG_MODE_NOSUBSYS) {
 			sprintf (&newstring[i], "%s", format);
 		} else {
 			sprintf (&newstring[i], "[%-5s] %s", logsys_loggers[id].subsys, format);
Index: exec/logsys.h
===================================================================
--- exec/logsys.h	(revision 1569)
+++ exec/logsys.h	(revision 1570)
@@ -52,6 +52,8 @@
 #define LOG_MODE_DISPLAY_TIMESTAMP	(1<<7)
 #define LOG_MODE_BUFFER_BEFORE_CONFIG	(1<<8)
 #define LOG_MODE_FLUSH_AFTER_CONFIG	(1<<9)
+#define LOG_MODE_SHORT_FILELINE		(1<<10)
+#define LOG_MODE_NOSUBSYS		(1<<11)
 
 /*
  * Log priorities, compliant with syslog and SA Forum Log spec.

revision-1571.patch:

--- NEW FILE revision-1571.patch ---
Index: test/testcpg.c
===================================================================
--- test/testcpg.c	(revision 1570)
+++ test/testcpg.c	(revision 1571)
@@ -1,9 +1,9 @@
 /*
- * Copyright (c) 2006-2007 Red Hat Inc
+ * Copyright (c) 2006-2008 Red Hat Inc
  *
  * All rights reserved.
  *
- * Author: Patrick Caulfield <pcaulfie at redhat.com>
+ * Author: Christine Caulfield <ccaulfie at redhat.com>
  *
  * This software licensed under BSD license, the text of which follows:
  *
@@ -141,9 +141,36 @@
 	}
 }
 
+void GroupsGetCallback(cpg_handle_t handle,
+		       uint32_t groupnum,
+		       uint32_t groupmax,
+		       struct cpg_name *group_name,
+		       struct cpg_address *member_list, int member_list_entries)
+{
+	int i;
+	struct in_addr saddr;
+
+	printf("Groups List Callback %d/%d: ", groupnum, groupmax);
+	print_cpgname(group_name);
+	printf("\n");
+	for (i=0; i<member_list_entries; i++) {
+		if (show_ip) {
+			saddr.s_addr = member_list[i].nodeid;
+			printf("node/pid: %s/%d\n",
+			       inet_ntoa (saddr), member_list[i].pid);
+		}
+		else {
+			printf("node/pid: %d/%d\n",
+			       member_list[i].nodeid, member_list[i].pid);
+		}
+	}
+}
+
+
 cpg_callbacks_t callbacks = {
 	.cpg_deliver_fn =            DeliverCallback,
 	.cpg_confchg_fn =            ConfchgCallback,
+	.cpg_groups_get_fn =         GroupsGetCallback
 };
 
 void sigintr_handler (int signum) {
@@ -159,6 +186,7 @@
 	const char *options = "i";
 	int opt;
 	unsigned int nodeid;
+	unsigned int num_groups;
 
 	while ( (opt = getopt(argc, argv, options)) != -1 ) {
 		switch (opt) {
@@ -195,6 +223,13 @@
 		exit (1);
 	}
 
+	cpg_groups_get(handle, &num_groups);
+	if (result != SA_AIS_OK) {
+		printf ("Could not get list of groups, error %d\n", result);
+		exit (1);
+	}
+	printf("%d groups known to this node\n", num_groups);
+
 	FD_ZERO (&read_fds);
 	cpg_fd_get(handle, &select_fd);
 	printf ("Type EXIT to finish\n");
Index: include/ipc_cpg.h
===================================================================
--- include/ipc_cpg.h	(revision 1570)
+++ include/ipc_cpg.h	(revision 1571)
@@ -1,9 +1,9 @@
 /*
- * Copyright (c) 2006 Red Hat, Inc.
+ * Copyright (c) 2006-2008 Red Hat, Inc.
  *
  * All rights reserved.
  *
- * Author: Patrick Caulfield (pcaulfie at redhat.com)
+ * Author: Christine Caulfield (ccaulfie at redhat.com)
  *
  * This software licensed under BSD license, the text of which follows:
  *
@@ -46,7 +46,8 @@
 	MESSAGE_REQ_CPG_MEMBERSHIP = 3,
 	MESSAGE_REQ_CPG_TRACKSTART = 4,
 	MESSAGE_REQ_CPG_TRACKSTOP = 5,
-	MESSAGE_REQ_CPG_LOCAL_GET = 6
+	MESSAGE_REQ_CPG_LOCAL_GET = 6,
+	MESSAGE_REQ_CPG_GROUPS_GET = 7
 };
 
 enum res_cpg_types {
@@ -59,7 +60,9 @@
 	MESSAGE_RES_CPG_TRACKSTART = 6,
 	MESSAGE_RES_CPG_TRACKSTOP = 7,
 	MESSAGE_RES_CPG_FLOW_CONTROL_STATE_SET = 8,
-	MESSAGE_RES_CPG_LOCAL_GET = 9
+	MESSAGE_RES_CPG_LOCAL_GET = 9,
+	MESSAGE_RES_CPG_GROUPS_GET = 10,
+	MESSAGE_RES_CPG_GROUPS_CALLBACK = 11
 };
 
 enum lib_cpg_confchg_reason {
@@ -158,4 +161,22 @@
 	mar_res_header_t header __attribute__((aligned(8)));
 };
 
+struct req_lib_cpg_groups_get {
+	mar_req_header_t header __attribute__((aligned(8)));
+};
+
+struct res_lib_cpg_groups_get {
+	mar_res_header_t header __attribute__((aligned(8)));
+	mar_uint32_t num_groups __attribute__((aligned(8)));
+};
+
+struct res_lib_cpg_groups_get_callback {
+	mar_res_header_t header __attribute__((aligned(8)));
+	mar_uint32_t group_num  __attribute__((aligned(8)));
+	mar_uint32_t total_groups  __attribute__((aligned(8)));
+	mar_cpg_name_t group_name __attribute__((aligned(8)));
+	mar_uint32_t num_members __attribute__((aligned(8)));
+	mar_cpg_address_t member_list[];
+};
+
 #endif /* IPC_CPG_H_DEFINED */
Index: include/cpg.h
===================================================================
--- include/cpg.h	(revision 1570)
+++ include/cpg.h	(revision 1571)
@@ -1,9 +1,9 @@
 /*
- * Copyright (c) 2006 Red Hat, Inc.
+ * Copyright (c) 2006-2008 Red Hat, Inc.
  *
  * All rights reserved.
  *
- * Author: Patrick Caulfield (pcaulfi at redhat.com)
+ * Author: Christine Caulfield (ccaulfi at redhat.com)
  *
  * This software licensed under BSD license, the text of which follows:
  *
@@ -114,9 +114,17 @@
 	struct cpg_address *left_list, int left_list_entries,
 	struct cpg_address *joined_list, int joined_list_entries);
 
+typedef void (*cpg_groups_get_fn_t) (
+	cpg_handle_t handle,
+	uint32_t group_num,
+	uint32_t group_total,
+	struct cpg_name *group_name,
+	struct cpg_address *member_list, int member_list_entries);
+
 typedef struct {
 	cpg_deliver_fn_t cpg_deliver_fn;
 	cpg_confchg_fn_t cpg_confchg_fn;
+	cpg_groups_get_fn_t cpg_groups_get_fn;
 } cpg_callbacks_t;
 
 /** @} */
@@ -189,7 +197,6 @@
 	struct iovec *iovec,
 	int iov_len);
 
-
 /*
  * Get membership information from cpg
  */
@@ -203,6 +210,10 @@
 	cpg_handle_t handle,
 	unsigned int *local_nodeid);
 
+cpg_error_t cpg_groups_get (
+	cpg_handle_t handle,
+	unsigned int *num_groups);
+
 cpg_error_t cpg_flow_control_state_get (
 	cpg_handle_t handle,
 	cpg_flow_control_state_t *flow_control_enabled);
Index: exec/cpg.c
===================================================================
--- exec/cpg.c	(revision 1570)
+++ exec/cpg.c	(revision 1571)
@@ -1,10 +1,10 @@
 /*
- * Copyright (c) 2006 Red Hat, Inc.
+ * Copyright (c) 2006, 2008 Red Hat, Inc.
  * Copyright (c) 2006 Sun Microsystems, Inc.
  *
  * All rights reserved.
  *
- * Author: Patrick Caulfield (pcaulfie at redhat.com)
+ * Author: Christine Caulfield (ccaulfie at redhat.com)
  *
  * This software licensed under BSD license, the text of which follows:
  *
@@ -180,6 +180,8 @@
 
 static void message_handler_req_lib_cpg_local_get (void *conn, void *message);
 
+static void message_handler_req_lib_cpg_groups_get (void *conn, void *message);
+
 static int cpg_node_joinleave_send (struct group_info *gi, struct process_info *pi, int fn, int reason);
 
 static int cpg_exec_send_joinlist(void);
@@ -234,6 +236,12 @@
 		.response_size				= sizeof (struct res_lib_cpg_local_get),
 		.response_id				= MESSAGE_RES_CPG_LOCAL_GET,
 		.flow_control				= OPENAIS_FLOW_CONTROL_NOT_REQUIRED
+	},
+	{ /* 7 */
+		.lib_handler_fn				= message_handler_req_lib_cpg_groups_get,
+		.response_size				= sizeof (struct res_lib_cpg_groups_get),
+		.response_id				= MESSAGE_RES_CPG_GROUPS_GET,
+		.flow_control				= OPENAIS_FLOW_CONTROL_NOT_REQUIRED
 	}
 };
 
@@ -494,6 +502,20 @@
 	return (0);
 }
 
+static int count_groups(void)
+{
+	struct list_head *iter;
+	int num_groups = 0;
+	uint32_t hash;
+
+	for (hash=0 ; hash < GROUP_HASH_SIZE; hash++) {
+		for (iter = group_lists[hash].next; iter != &group_lists[hash]; iter = iter->next) {
+			num_groups++;
+		}
+	}
+	return num_groups;
+}
+
 static struct group_info *get_group(mar_cpg_name_t *name)
 {
 	struct list_head *iter;
@@ -523,6 +545,70 @@
 	return gi;
 }
 
+static void send_group_list_callbacks(int num_groups, void *conn)
+{
+	struct list_head *iter, *piter;
+	struct group_info *gi;
+	uint32_t hash;
+	int max_proc_count=0;
+	int size;
+	int group_counter = 0;
+	char *buf = NULL;
+	struct res_lib_cpg_groups_get_callback *res;
+	mar_cpg_address_t *retgi;
+
+	for (hash=0; hash < GROUP_HASH_SIZE; hash++) {
+		for (iter = group_lists[hash].next; iter != &group_lists[hash]; iter = iter->next) {
+			gi = list_entry(iter, struct group_info, list);
+			int proc_count = 0;
+
+			/* First, we need to know how many processes are in the list */
+			for (piter = gi->members.next; piter != &gi->members; piter = piter->next) {
+				struct process_info *pi = list_entry(piter, struct process_info, list);
+				if (pi->pid)
+					proc_count++;
+			}
+
+			/* Make sure we have adequate buffer space */
+			if (proc_count > max_proc_count) {
+				max_proc_count = proc_count+10;
+				size = max_proc_count*sizeof(mar_cpg_address_t) +
+					sizeof(struct res_lib_cpg_groups_get_callback);
+				buf = realloc(buf, size);
+				if (!buf) {
+					log_printf(LOG_LEVEL_WARNING, "Unable to allocate group_list struct");
+					return;
+				}
+			}
+
+			res = (struct res_lib_cpg_groups_get_callback *)buf;
+			retgi = res->member_list;
+
+			res->header.size = size;
+			res->header.id = MESSAGE_RES_CPG_GROUPS_CALLBACK;
+
+
+			memcpy(&res->group_name, &gi->group_name, sizeof(mar_cpg_name_t));
+			res->num_members = proc_count;
+			res->group_num = ++group_counter;
+			res->total_groups = num_groups;
+
+			for (piter = gi->members.next; piter != &gi->members; piter = piter->next) {
+				struct process_info *pi = list_entry(piter, struct process_info, list);
+				if (pi->pid) {
+					retgi->nodeid = pi->nodeid;
+					retgi->pid = pi->pid;
+					retgi->reason = 0;
+					retgi++;
+				}
+			}
+			openais_conn_send_response(conn, buf, size);
+		}
+	}
+	if (buf)
+		free(buf);
+}
+
 static int cpg_node_joinleave_send (struct group_info *gi, struct process_info *pi, int fn, int reason)
 {
 	struct req_exec_cpg_procjoin req_exec_cpg_procjoin;
@@ -696,7 +782,7 @@
 	unsigned int i;
 
 	req_exec_cpg_downlist->left_nodes = swab32(req_exec_cpg_downlist->left_nodes);
- 
+
 	for (i = 0; i < req_exec_cpg_downlist->left_nodes; i++) {
 		req_exec_cpg_downlist->nodeids[i] = swab32(req_exec_cpg_downlist->nodeids[i]);
 	}
@@ -920,7 +1006,7 @@
 	/* Send to all interested members */
 	for (iter = gi->members.next; iter != &gi->members; iter = iter->next) {
 		struct process_info *pi = list_entry(iter, struct process_info, list);
-		if (pi->trackerconn) {
+		if (pi->trackerconn && (pi->flags & PI_FLAG_MEMBER)) {
 			openais_conn_send_response(
 				pi->trackerconn,
 				buf,
@@ -1225,3 +1311,21 @@
 	openais_conn_send_response(conn, &res_lib_cpg_local_get,
 		sizeof(res_lib_cpg_local_get));
 }
+
+static void message_handler_req_lib_cpg_groups_get (void *conn, void *message)
+{
+	struct res_lib_cpg_groups_get res_lib_cpg_groups_get;
+
+	res_lib_cpg_groups_get.header.size = sizeof(res_lib_cpg_groups_get);
+	res_lib_cpg_groups_get.header.id = MESSAGE_RES_CPG_GROUPS_GET;
+	res_lib_cpg_groups_get.header.error = SA_AIS_OK;
+	res_lib_cpg_groups_get.num_groups = count_groups();
+
+	openais_conn_send_response(conn, &res_lib_cpg_groups_get,
+		sizeof(res_lib_cpg_groups_get));
+
+	/* Now do the callbacks for each group */
+	send_group_list_callbacks(res_lib_cpg_groups_get.num_groups,
+		openais_conn_partner_get (conn));
+}
+
Index: lib/cpg.c
===================================================================
--- lib/cpg.c	(revision 1570)
+++ lib/cpg.c	(revision 1571)
@@ -1,11 +1,11 @@
 /*
  * vi: set autoindent tabstop=4 shiftwidth=4 :
  *
- * Copyright (c) 2006 Red Hat, Inc.
+ * Copyright (c) 2006-2008 Red Hat, Inc.
  *
  * All rights reserved.
  *
- * Author: Patrick Caulfield (pcaulfie at redhat.com)
+ * Author: Christine Caulfield (ccaulfie at redhat.com)
  *
  * This software licensed under BSD license, the text of which follows:
  *
@@ -72,7 +72,7 @@
 };
 
 /*
- * Clean up function for a cpg instance (cpg_nitialize) handle
+ * Clean up function for a cpg instance (cpg_initialize) handle
  */
 static void cpg_instance_destructor (void *instance)
 {
@@ -250,6 +250,7 @@
 	struct cpg_inst *cpg_inst;
 	struct res_lib_cpg_confchg_callback *res_cpg_confchg_callback;
 	struct res_lib_cpg_deliver_callback *res_cpg_deliver_callback;
+	struct res_lib_cpg_groups_get_callback *res_lib_cpg_groups_get_callback;
 	cpg_callbacks_t callbacks;
 	struct res_overlay dispatch_data;
 	int ignore_dispatch = 0;
@@ -396,7 +397,24 @@
 				joined_list,
 				res_cpg_confchg_callback->joined_list_entries);
 			break;
+		case MESSAGE_RES_CPG_GROUPS_CALLBACK:
+			res_lib_cpg_groups_get_callback = (struct res_lib_cpg_groups_get_callback *)&dispatch_data;
+			marshall_from_mar_cpg_name_t (
+				&group_name,
+				&res_lib_cpg_groups_get_callback->group_name);
+			for (i = 0; i < res_lib_cpg_groups_get_callback->num_members; i++) {
+				marshall_from_mar_cpg_address_t (&member_list[i],
+					&res_lib_cpg_groups_get_callback->member_list[i]);
+			}
 
+			callbacks.cpg_groups_get_fn(handle,
+						    res_lib_cpg_groups_get_callback->group_num,
+						    res_lib_cpg_groups_get_callback->total_groups,
+						    &group_name,
+						    member_list,
+						    res_lib_cpg_groups_get_callback->num_members);
+			break;
+
 		default:
 			error = SA_AIS_ERR_LIBRARY;
 			goto error_nounlock;
@@ -690,6 +708,48 @@
 	return (error);
 }
 
+cpg_error_t cpg_groups_get (
+	cpg_handle_t handle,
+	unsigned int *num_groups)
+{
+	cpg_error_t error;
+	struct cpg_inst *cpg_inst;
+	struct iovec iov;
+	struct req_lib_cpg_groups_get req_lib_cpg_groups_get;
+	struct res_lib_cpg_groups_get res_lib_cpg_groups_get;
+
+	error = saHandleInstanceGet (&cpg_handle_t_db, handle, (void *)&cpg_inst);
+	if (error != SA_AIS_OK) {
+		return (error);
+	}
+
+	req_lib_cpg_groups_get.header.size = sizeof (mar_req_header_t);
+	req_lib_cpg_groups_get.header.id = MESSAGE_REQ_CPG_GROUPS_GET;
+
+	iov.iov_base = &req_lib_cpg_groups_get;
+	iov.iov_len = sizeof (struct req_lib_cpg_groups_get);
+
+	pthread_mutex_lock (&cpg_inst->response_mutex);
+
+	error = saSendMsgReceiveReply (cpg_inst->response_fd, &iov, 1,
+		&res_lib_cpg_groups_get, sizeof (res_lib_cpg_groups_get));
+
+	pthread_mutex_unlock (&cpg_inst->response_mutex);
+
+	if (error != SA_AIS_OK) {
+		goto error_exit;
+	}
+
+	*num_groups = res_lib_cpg_groups_get.num_groups;
+	error = res_lib_cpg_groups_get.header.error;
+
+	/* Real output is delivered via a callback */
+error_exit:
+	saHandleInstancePut (&cpg_handle_t_db, handle);
+
+	return (error);
+}
+
 cpg_error_t cpg_flow_control_state_get (
 	cpg_handle_t handle,
 	cpg_flow_control_state_t *flow_control_state)
Index: man/cpg_initialize.3
===================================================================
--- man/cpg_initialize.3	(revision 1570)
+++ man/cpg_initialize.3	(revision 1571)
@@ -1,9 +1,9 @@
 .\"/*
-.\" * Copyright (c) 2006 Red Hat, Inc.
+.\" * Copyright (c) 2006-2008 Red Hat, Inc.
 .\" *
 .\" * All rights reserved.
 .\" *
-.\" * Author: Patrick Caulfield <pcaulfie at redhat.com>
+.\" * Author: Christine Caulfield <ccaulfie at redhat.com>
 .\" *
 .\" * This software licensed under BSD license, the text of which follows:
 .\" * 
@@ -77,6 +77,14 @@
         struct cpg_address *member_list, int member_list_entries,
         struct cpg_address *left_list, int left_list_entries,
         struct cpg_address *joined_list, int joined_list_entries);
+
+typedef void (*cpg_groups_get_fn_t) (
+	cpg_handle_t handle,
+	uint32_t group_num,
+	uint32_t group_total,
+	struct cpg_name *group_name,
+	struct cpg_address *member_list, int member_list_entries);
+
 .ta
 .fi
 .RE
@@ -94,6 +102,7 @@
 typedef struct {
         cpg_deliver_fn_t cpg_deliver_fn;
         cpg_confchg_fn_t cpg_confchg_fn;
+	cpg_groups_get_fn_t cpg_groups_get_fn;
 } cpg_callbacks_t;
 .ta
 .fi
@@ -159,4 +168,5 @@
 .BR cpg_leave (3),
 .BR cpg_mcast_joined (3),
 .BR cpg_membership_get (3)
+.BR cpg_groups_get (3)
 .PP
Index: man/index.html
===================================================================
--- man/index.html	(revision 1570)
+++ man/index.html	(revision 1571)
@@ -53,35 +53,37 @@
 <A HREF="cpg_membership_get.html">cpg_membership_get(3)</A>: Description of the cpg_membership_get interface.
 <BR>
 <A HREF="cpg_local_get.html">cpg_local_get(3)</A>: Description of the cpg_local_get interface.
+<BR>
+<A HREF="cpg_groups_get.html">cpg_local_get(3)</A>: Description of the cpg_groups_get interface.
 
 <BR>
 <A HREF="confdb_overview.html">confdb_overview(3)</A>: An overview of the Configuration database toolkit
 <BR>
-<A HREF="confdb_dispatch.html">confdb_dispatch(3)</A>: Description of the confdb_dispatch.html interface.
+<A HREF="confdb_dispatch.html">confdb_dispatch(3)</A>: Description of the confdb_dispatch interface.
 <BR>
-<A HREF="confdb_fd_get.html">confdb_fd_get(3)</A>: Description of the confdb_fd_get.html interface.
+<A HREF="confdb_fd_get.html">confdb_fd_get(3)</A>: Description of the confdb_fd_get interface.
 <BR>
-<A HREF="confdb_finalize.html">confdb_finalize(3)</A>: Description of the confdb_finalize.html interface.
+<A HREF="confdb_finalize.html">confdb_finalize(3)</A>: Description of the confdb_finalize interface.
 <BR>
-<A HREF="confdb_initialize.html">confdb_initialize(3)</A>: Description of the confdb_initialize.html interface.
+<A HREF="confdb_initialize.html">confdb_initialize(3)</A>: Description of the confdb_initialize interface.
 <BR>
-<A HREF="confdb_key_create.html">confdb_key_create(3)</A>: Description of the confdb_key_create.html interface.
+<A HREF="confdb_key_create.html">confdb_key_create(3)</A>: Description of the confdb_key_create interface.
 <BR>
-<A HREF="confdb_key_delete.html">confdb_key_delete(3)</A>: Description of the confdb_key_delete.html interface.
+<A HREF="confdb_key_delete.html">confdb_key_delete(3)</A>: Description of the confdb_key_delete interface.
 <BR>
-<A HREF="confdb_key_iter.html">confdb_key_iter(3)</A>: Description of the confdb_key_iter.html interface.
+<A HREF="confdb_key_iter.html">confdb_key_iter(3)</A>: Description of the confdb_key_iter interface.
 <BR>
-<A HREF="confdb_key_replace.html">confdb_key_replace(3)</A>: Description of the confdb_key_replace.html interface.
+<A HREF="confdb_key_replace.html">confdb_key_replace(3)</A>: Description of the confdb_key_replace interface.
 <BR>
-<A HREF="confdb_object_create.html">confdb_object_create(3)</A>: Description of the confdb_object_create.html interface.
+<A HREF="confdb_object_create.html">confdb_object_create(3)</A>: Description of the confdb_object_create interface.
 <BR>
-<A HREF="confdb_object_destroy.html">confdb_object_destroy(3)</A>: Description of the confdb_object_destroy.html interface.
+<A HREF="confdb_object_destroy.html">confdb_object_destroy(3)</A>: Description of the confdb_object_destroy interface.
 <BR>
-<A HREF="confdb_object_find.html">confdb_object_find(3)</A>: Description of the confdb_object_find.html interface.
+<A HREF="confdb_object_find.html">confdb_object_find(3)</A>: Description of the confdb_object_find interface.
 <BR>
-<A HREF="confdb_object_iter.html">confdb_object_iter(3)</A>: Description of the confdb_object_iter.html interface.
+<A HREF="confdb_object_iter.html">confdb_object_iter(3)</A>: Description of the confdb_object_iter interface.
 <BR>
-<A HREF="confdb_object_parent_get.html">confdb_object_parent_get(3)</A>: Description of the confdb_object_parent_get.html interface.
+<A HREF="confdb_object_parent_get.html">confdb_object_parent_get(3)</A>: Description of the confdb_object_parent_get interface.
 
 
 </body>

revision-1572.patch:

--- NEW FILE revision-1572.patch ---
Index: exec/logsys.c
===================================================================
--- exec/logsys.c	(revision 1571)
+++ exec/logsys.c	(revision 1572)
@@ -636,3 +636,41 @@
 {
 	worker_thread_group_wait (&log_thread_group);
 }
+
+int logsys_init (char *name, int mode, int facility, int priority, char *file)
+{
+	char *errstr;
+
+	logsys_subsys_id = 0;
+
+	strncpy (logsys_loggers[0].subsys, name,
+		 sizeof (logsys_loggers[0].subsys));
+	logsys_config_mode_set (mode);
+	logsys_config_facility_set (name, facility);
+	logsys_config_file_set (&errstr, file);
+	_logsys_config_priority_set (0, priority);
+	if ((mode & LOG_MODE_BUFFER_BEFORE_CONFIG) == 0) {
+		_logsys_wthread_create ();
+	}
+	return (0);
+}
+
+int logsys_conf (char *name, int mode, int facility, int priority, char *file)
+{
+	char *errstr;
+
+	strncpy (logsys_loggers[0].subsys, name,
+		sizeof (logsys_loggers[0].subsys));
+	logsys_config_mode_set (mode);
+	logsys_config_facility_set (name, facility);
+	logsys_config_file_set (&errstr, file);
+	_logsys_config_priority_set (0, priority);
+	return (0);
+}
+
+void logsys_exit (void)
+{
+	logsys_subsys_id = -1;
+	logsys_flush ();
+}
+
Index: exec/logsys.h
===================================================================
--- exec/logsys.h	(revision 1571)
+++ exec/logsys.h	(revision 1572)
@@ -38,6 +38,7 @@
 
 #include <stdarg.h>
 #include <syslog.h>
+#include <assert.h>
 
 /*
  * MODE_OUTPUT_SYSLOG_* modes are mutually exclusive
@@ -172,8 +173,9 @@
 	}								\
 }
 
+static unsigned int logsys_subsys_id __attribute__((unused)) = -1;	\
+
 #define LOGSYS_DECLARE_NOSUBSYS(priority)				\
-static unsigned int logsys_subsys_id __attribute__((unused));		\
 __attribute__ ((constructor)) static void logsys_nosubsys_init (void)	\
 {									\
 	_logsys_nosubsys_set();						\
@@ -182,7 +184,6 @@
 }
 
 #define LOGSYS_DECLARE_SUBSYS(subsys,priority)				\
-static unsigned int logsys_subsys_id __attribute__((unused));		\
 __attribute__ ((constructor)) static void logsys_subsys_init (void)	\
 {									\
 	logsys_subsys_id =						\
@@ -190,6 +191,7 @@
 }
 
 #define log_printf(lvl, format, args...) do {				\
+	assert (logsys_subsys_id != -1);				\
 	if ((lvl) <= logsys_loggers[logsys_subsys_id].priority)	{	\
 		_logsys_log_printf2 (__FILE__, __LINE__, lvl,		\
 			logsys_subsys_id, (format), ##args);		\
@@ -197,6 +199,7 @@
 } while(0)
 
 #define dprintf(format, args...) do {					\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_log_printf2 (__FILE__, __LINE__, LOG_DEBUG,	\
 			logsys_subsys_id, (format), ##args);		\
@@ -204,6 +207,7 @@
 } while(0)
 
 #define ENTER_VOID() do {						\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_ENTER,	\
 			logsys_subsys_id, ">%s\n", __FUNCTION__);	\
@@ -211,6 +215,7 @@
 } while(0)
 
 #define ENTER(format, args...) do {					\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_ENTER,	\
 			logsys_subsys_id, ">%s: " format, __FUNCTION__,	\
@@ -219,6 +224,7 @@
 } while(0)
 
 #define LEAVE_VOID() do {						\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_LEAVE,	\
 			logsys_subsys_id, "<%s\n", __FUNCTION__);	\
@@ -226,6 +232,7 @@
 } while(0)
 
 #define LEAVE(format, args...) do {					\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_LEAVE,	\
 			logsys_subsys_id, "<%s: " format,		\
@@ -234,6 +241,7 @@
 } while(0)
 
 #define TRACE1(format, args...) do {					\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE1,	\
 			logsys_subsys_id, (format), ##args);		\
@@ -241,6 +249,7 @@
 } while(0)
 
 #define TRACE2(format, args...) do {					\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE2,	\
 			logsys_subsys_id, (format), ##args);		\
@@ -248,6 +257,7 @@
 } while(0)
 
 #define TRACE3(format, args...) do { \
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE3,	\
 			logsys_subsys_id, (format), ##args);		\
@@ -255,6 +265,7 @@
 } while(0)
 
 #define TRACE4(format, args...) do { \
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE4,	\
 			logsys_subsys_id, (format), ##args);		\
@@ -262,6 +273,7 @@
 } while(0)
 
 #define TRACE5(format, args...) do {					\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE5,	\
 		logsys_subsys_id, (format), ##args);			\
@@ -269,6 +281,7 @@
 } while(0)
 
 #define TRACE6(format, args...) do {					\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE6,	\
 			logsys_subsys_id, (format), ##args);		\
@@ -276,6 +289,7 @@
 } while(0)
 
 #define TRACE7(format, args...) do {					\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE7,	\
 			 logsys_subsys_id, (format), ##args);		\
@@ -283,6 +297,7 @@
 } while(0)
 
 #define TRACE8(format, args...) do {					\
+	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 	_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE8,		\
 	 logsys_subsys_id, (format), ##args);				\
@@ -295,4 +310,10 @@
 	_logsys_config_priority_set (logsys_subsys_id, priority);       \
 } while(0)
 
+/* simple, function-based api */
+
+int logsys_init (char *name, int mode, int facility, int priority, char *file);
+int logsys_conf (char *name, int mode, int facility, int priority, char *file);
+void logsys_exit (void);
+
 #endif /* LOGSYS_H_DEFINED */

revision-1573.patch:

--- NEW FILE revision-1573.patch ---
Index: exec/mainconfig.c
===================================================================
--- exec/mainconfig.c	(revision 1572)
+++ exec/mainconfig.c	(revision 1573)
@@ -187,6 +187,7 @@
 			}
 		}
 
+		objdb->object_find_reset(object_service_handle);
 		while (objdb->object_find (object_service_handle,
 			"logger_subsys",
 			strlen ("logger_subsys"),

revision-1574.patch:

--- NEW FILE revision-1574.patch ---
Index: exec/logsys.c
===================================================================
--- exec/logsys.c	(revision 1573)
+++ exec/logsys.c	(revision 1574)
@@ -84,7 +84,9 @@
 #endif
 struct logsys_logger logsys_loggers[MAX_LOGGERS];
 
+int logsys_single_id = 0;
 
+
 struct log_entry {
 	char *file;
 	int line;
@@ -641,7 +643,8 @@
 {
 	char *errstr;
 
-	logsys_subsys_id = 0;
+	/* logsys_subsys_id will be 0 */
+	logsys_single_id = 1;
 
 	strncpy (logsys_loggers[0].subsys, name,
 		 sizeof (logsys_loggers[0].subsys));
@@ -670,7 +673,6 @@
 
 void logsys_exit (void)
 {
-	logsys_subsys_id = -1;
 	logsys_flush ();
 }
 
Index: exec/logsys.h
===================================================================
--- exec/logsys.h	(revision 1573)
+++ exec/logsys.h	(revision 1574)
@@ -97,6 +97,8 @@
 
 extern struct logsys_logger logsys_loggers[];
 
+extern int logsys_single_id;
+
 extern inline int logsys_mkpri (int priority, int id);
 
 extern void logsys_config_mode_set (
@@ -191,6 +193,8 @@
 }
 
 #define log_printf(lvl, format, args...) do {				\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if ((lvl) <= logsys_loggers[logsys_subsys_id].priority)	{	\
 		_logsys_log_printf2 (__FILE__, __LINE__, lvl,		\
@@ -199,6 +203,8 @@
 } while(0)
 
 #define dprintf(format, args...) do {					\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_log_printf2 (__FILE__, __LINE__, LOG_DEBUG,	\
@@ -207,6 +213,8 @@
 } while(0)
 
 #define ENTER_VOID() do {						\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_ENTER,	\
@@ -215,6 +223,8 @@
 } while(0)
 
 #define ENTER(format, args...) do {					\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_ENTER,	\
@@ -224,6 +234,8 @@
 } while(0)
 
 #define LEAVE_VOID() do {						\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_LEAVE,	\
@@ -232,6 +244,8 @@
 } while(0)
 
 #define LEAVE(format, args...) do {					\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_LEAVE,	\
@@ -241,6 +255,8 @@
 } while(0)
 
 #define TRACE1(format, args...) do {					\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE1,	\
@@ -249,6 +265,8 @@
 } while(0)
 
 #define TRACE2(format, args...) do {					\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE2,	\
@@ -257,6 +275,8 @@
 } while(0)
 
 #define TRACE3(format, args...) do { \
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE3,	\
@@ -265,6 +285,8 @@
 } while(0)
 
 #define TRACE4(format, args...) do { \
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE4,	\
@@ -273,6 +295,8 @@
 } while(0)
 
 #define TRACE5(format, args...) do {					\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE5,	\
@@ -281,6 +305,8 @@
 } while(0)
 
 #define TRACE6(format, args...) do {					\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE6,	\
@@ -289,6 +315,8 @@
 } while(0)
 
 #define TRACE7(format, args...) do {					\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 		_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE7,	\
@@ -297,6 +325,8 @@
 } while(0)
 
 #define TRACE8(format, args...) do {					\
+	if (logsys_single_id)						\
+		logsys_subsys_id = 0;					\
 	assert (logsys_subsys_id != -1);				\
 	if (LOG_LEVEL_DEBUG <= logsys_loggers[logsys_subsys_id].priority) { \
 	_logsys_trace (__FILE__, __LINE__, LOGSYS_TAG_TRACE8,		\

revision-1575.patch:

--- NEW FILE revision-1575.patch ---
Index: man/logsys_overview.8
===================================================================
--- man/logsys_overview.8	(revision 1574)
+++ man/logsys_overview.8	(revision 1575)
@@ -42,19 +42,19 @@
 .PP
 Support for 8 tracing levels and tracing the entering and leaving of functions
 .PP
-Declartion of logging system or subsystem without calling any functions
+Declaration of logging system or subsystem without calling any functions
 .PP
 Dynamic reconfiguration of the logging system parameters
 .PP
 Logging to syslog, file, stderr.
 
-.SH Declartion of the System logger
+.SH Declaration of the System logger
 The logsys library is initially configured by including logsys.h and declaring
 a logger.  Once the logger is declared either a subsystem logger or nosubsystem
 logger is declared in every file.
 
 The definition LOGSYS_DECLARE_SYSTEM is placed after the include section of one
-C file in the application.  This declartion creates a constructor function
+C file in the application.  This declaration creates a constructor function
 which will be called automatically.  This technique avoids the need for calling
 any setup functions in short applications that don't require it.
 
@@ -62,22 +62,24 @@
 The name parameter is the name of the application.
 The mode parameter is the logging mode of the system.  The following modes
 can be configured by logically ORing these flags:
-LOG_MODE_OUTPUT_FILE: Output all log data to the file parameter of this declartion
+LOG_MODE_OUTPUT_FILE: Output all log data to the file parameter of this declaration
 LOG_MODE_OUTPUT_STDERR: Output all log data to the stderr descriptor
 LOG_MODE_OUTPUT_SYSLOG_THREADED: Output all log data to syslog using a non-blocking thread
 LOG_MODE_OUTPUT_SYSLOG_LOSSY: Output all log data without using a thread but potentially losing data.  This mode is not yet implemented.
 LOG_MODE_OUTPUT_SYSLOG_BLOCKING: Output all log data without using a thread and potentially blocking at each syslog call.
 LOG_MODE_DISPLAY_PRIORITY: Output the priority of the log entry in the message contents.  This mode is currently not implemented.
 LOG_MODE_DISPLAY_FILELINE: Output the file and line at which the log message was created.
+LOG_MODE_SHORT_FILELINE: When using LOG_DEBUG level or LOG_MODE_DISPLAY_FILELINE, typically the absolute path to the file (derived at compile-time) is displayed.  Enabling this flag ensures that only the filename and line are displayed.
 LOG_MODE_DISPLAY_TIMESTAMP: Output the timestamp of the message.
 LOG_MODE_BUFFER_BEFORE_CONFIG: This mode is used to buffer log messages before logsys_mode_config is called.  This is useful in applications in which the logging file isn't known before the application is compiled and must be set dynamically.  It is also useful when an application calls fork to disconnect the local tty and should hold logging of messages until after the fork.
-LOG_MODE_FLUSH_AFTER_CONFIG: This mode is used to flush any buffered messages when the LOG_MODE_BUFFER_BEFORE_CONFIG declartion is specified in the declartion of the logger.
+LOG_MODE_FLUSH_AFTER_CONFIG: This mode is used to flush any buffered messages when the LOG_MODE_BUFFER_BEFORE_CONFIG declaration is specified in the declaration of the logger.
 The file parameter specifies the filename that should be used to log messages.  This parameter may be NULL if LOG_MODE_OUTPUT_FILE is not specified.
 The facility parameter is the syslog facility that should be used when logging
 messages.
+LOG_MODE_NOSUBSYS: Enabling this mode removes the subsystem tag from the beginning of the log lines.  This is not recommended for programs which have multiple subsystems.
 
 
-An example declartion would be:
+An example declaration would be:
 
 #include <openais/logsys.h>
 
@@ -90,7 +92,7 @@
 
 This would output any logging messages to stderr, syslog, and the file /tmp/log.
 
-.SH Declartion of subsystems or no subsystems
+.SH Declaration of subsystems or no subsystems
 The logsys library supports the logging of information to one main system or
 subsystem.  This is specified in each individual object file in the system.
 
@@ -113,7 +115,7 @@
 LOGSYS_DECLARE_SUBSYS ("SYS1", LOG_LEVEL_INFO);
 
 Any message of LOG_LEVEL_INFO priority or higher would be logged and any
-logging within the object file this declartion is specified within will be
+logging within the object file this declaration is specified within will be
 logged to the SYS1 subsystem identifier.
 
 .SH Logging Messages

revision-1576.patch:

--- NEW FILE revision-1576.patch ---
Index: exec/logsys.c
===================================================================
--- exec/logsys.c	(revision 1575)
+++ exec/logsys.c	(revision 1576)
@@ -277,7 +277,9 @@
 		fflush (stdout);
 	}
 
-	if (logsys_mode & LOG_MODE_OUTPUT_SYSLOG_THREADED) {
+	if ((logsys_mode & LOG_MODE_OUTPUT_SYSLOG_THREADED) &&
+		(!((logsys_mode & LOG_MODE_FILTER_DEBUG_FROM_SYSLOG) &&
+		   (log_data->priority == LOG_LEVEL_DEBUG)))) {
 		syslog (log_data->priority,
 			&log_data->log_string[log_data->syslog_pos]);
 	}
Index: exec/logsys.h
===================================================================
--- exec/logsys.h	(revision 1575)
+++ exec/logsys.h	(revision 1576)
@@ -55,6 +55,7 @@
 #define LOG_MODE_FLUSH_AFTER_CONFIG	(1<<9)
 #define LOG_MODE_SHORT_FILELINE		(1<<10)
 #define LOG_MODE_NOSUBSYS		(1<<11)
+#define LOG_MODE_FILTER_DEBUG_FROM_SYSLOG	(1<<12)
 
 /*
  * Log priorities, compliant with syslog and SA Forum Log spec.
Index: man/logsys_overview.8
===================================================================
--- man/logsys_overview.8	(revision 1575)
+++ man/logsys_overview.8	(revision 1576)
@@ -77,8 +77,8 @@
 The facility parameter is the syslog facility that should be used when logging
 messages.
 LOG_MODE_NOSUBSYS: Enabling this mode removes the subsystem tag from the beginning of the log lines.  This is not recommended for programs which have multiple subsystems.
+LOG_MODE_FILTER_DEBUG_FROM_SYSLOG: Enabling this mode will stop debug messages from being sent to syslog.
 
-
 An example declaration would be:
 
 #include <openais/logsys.h>

revision-1579.patch:

--- NEW FILE revision-1579.patch ---
Index: exec/logsys.c
===================================================================
--- exec/logsys.c	(revision 1578)
+++ exec/logsys.c	(revision 1579)
@@ -185,9 +185,6 @@
 			logsys_loggers[i].tags = tags;
 			logsys_loggers[i].priority = priority;
 
-			if (priority > logsys_loggers[i].priority) {
-				logsys_loggers[i].priority = priority;
-			}
 			break;
 		}
 	}
@@ -228,7 +225,7 @@
 			*tags = logsys_loggers[i].tags;
 			*priority = logsys_loggers[i].priority;
 			pthread_mutex_unlock (&logsys_config_mutex);
-			return (0);
+			return i;
 		}
 	}
 
@@ -483,10 +480,6 @@
 
 	logsys_loggers[id].priority = priority;
 
-	if (priority > logsys_loggers[id].priority) {
-		logsys_loggers[id].priority = priority;
-	}
-
 	pthread_mutex_unlock (&logsys_new_log_mutex);
 }
 
Index: exec/logsys.h
===================================================================
--- exec/logsys.h	(revision 1578)
+++ exec/logsys.h	(revision 1579)
@@ -181,16 +181,29 @@
 #define LOGSYS_DECLARE_NOSUBSYS(priority)				\
 __attribute__ ((constructor)) static void logsys_nosubsys_init (void)	\
 {									\
-	_logsys_nosubsys_set();						\
+	unsigned int pri, tags;						\
+									\
 	logsys_subsys_id =						\
-		_logsys_subsys_create ("MAIN", (priority));		\
+		logsys_config_subsys_get("MAIN", &tags, &pri);		\
+									\
+	if (logsys_subsys_id == -1) {					\
+		_logsys_nosubsys_set();					\
+		logsys_subsys_id =					\
+			_logsys_subsys_create ("MAIN", (priority));	\
+	}								\
 }
 
 #define LOGSYS_DECLARE_SUBSYS(subsys,priority)				\
 __attribute__ ((constructor)) static void logsys_subsys_init (void)	\
 {									\
+	unsigned int pri, tags;						\
+									\
 	logsys_subsys_id =						\
-		_logsys_subsys_create ((subsys), (priority));		\
+		logsys_config_subsys_get((subsys), &tags, &pri);	\
+									\
+	if (logsys_subsys_id == -1)					\
+		logsys_subsys_id =					\
+			_logsys_subsys_create ((subsys), (priority));	\
 }
 
 #define log_printf(lvl, format, args...) do {				\


Index: openais.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openais/devel/openais.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- openais.spec	24 Jun 2008 05:32:05 -0000	1.27
+++ openais.spec	14 Jul 2008 11:40:34 -0000	1.28
@@ -1,12 +1,24 @@
+%define alphatag svn1579
+
 Name: openais
 Summary: The openais Standards-Based Cluster Framework executive and APIs
 Version: 0.84
-Release: 1%{?alphatag:.%{alphatag}}%{?dist}
+Release: 2%{?alphatag:.%{alphatag}}%{?dist}
 License: BSD
 Group: System Environment/Base
 URL: http://developer.osdl.org/dev/openais/
 Source0: http://developer.osdl.org/dev/openais/downloads/openais-%{version}/openais-%{version}.tar.gz
 Patch0: openais-defaultconfig.patch
+Patch1: revision-1568.patch
+Patch2: revision-1569.patch
+Patch3: revision-1570.patch
+Patch4: revision-1571.patch
+Patch5: revision-1572.patch
+Patch6: revision-1573.patch
+Patch7: revision-1574.patch
+Patch8: revision-1575.patch
+Patch9: revision-1576.patch
+Patch10: revision-1579.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 ExclusiveArch: i386 ppc x86_64 ppc64 ia64 s390 s390x alpha
@@ -32,6 +44,16 @@
 %prep
 %setup -q -n openais-%{version}
 %patch0 -p0
+%patch1 -p0
+%patch2 -p0
+%patch3 -p0
+%patch4 -p0
+%patch5 -p0
+%patch6 -p0
+%patch7 -p0
+%patch8 -p0
+%patch9 -p0
+%patch10 -p0
 
 %build
 
@@ -169,6 +191,11 @@
 %{_mandir}/man3/confdb_*3*
 
 %changelog
+* Mon Jul 14 2008 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.84-2.svn1579
+- Update to svn trunk at revision 1579.
+  1577 (wrong commit) and 1578 (revert 1577) are not included (nor required)
+- Cleanup whitespace in spec file.
+
 * Mon Jun 23 2008 Steven Dake <sdake at redhat.com> - 0.84-1
 - New upstream release 0.84 with stability enhancements in protocols.
 
@@ -183,7 +210,7 @@
 * Mon May 12 2008 Steven Dake <sdake at redhat.com> - 0.83-1
 - Release 0.83.
 
-Tue Apr 29 2008 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.82-1.svn1528
+* Tue Apr 29 2008 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.82-1.svn1528
 - Update to latest svn trunk in preparation for 0.83.
 - Fix a bunch of rpmlint warnings/errors.
 - Merge bits from the fedora package.
@@ -200,6 +227,7 @@
 - Add upstream revision 1509 - Remove double pthread_mutex_destroy from cpg service.
 - Add upstream revision 1508 - Remove double pthread_mutex_destroy from clm service.
 - Add upstream revision 1507 - Remove double pthread_mutex_destroy from checkpoint service.
+
 * Sat Mar 15 2008 Steven Dake <sdake at redhat.com> - 0.80.3-14
 - Resolves: rhbz#432531
 - Add upstream revision 1506 - Resolves incomplete checkpoing synchronization when totem queue is full.
@@ -211,7 +239,6 @@
 - Add upstream revision 1502 - Revert revision 1477 which exhibits problems with cman.
 - Add revision 1477 - This was reverted in a previous version but cherrypicked.  Now the patch has been applied and reverted in the rpm build process to match upstream.
 
-
 * Tue Feb 26 2008 Steven Dake <sdake at redhat.com> - 0.80.3-12
 - Resolves: rhbz#433839
 - Fix problem with cvs not allowing new checkin requires new revision.
@@ -221,6 +248,7 @@
 - Add upstream revision 1500 - IPC locks up if a POLLERR is returned in certain circumstances.
 - Resolves: rhbz#433839
 - Add upstream revision 1501 - A mcast is delivered before a join in some circumstances.
+
 * Fri Jan 18 2008 Steven Dake <sdake at redhat.com> - 0.80.3-10
 - Resolves: rhbz#249287
 - Remove upstream revision 1477 - Exhibits problem with revolver tester




More information about the fedora-extras-commits mailing list