Update the corosync-trunk patch for real this time.

This commit is contained in:
Fabio M. Di Nitto 2009-03-10 11:42:15 +00:00
parent cdf706edf8
commit 735411c454
2 changed files with 85 additions and 10 deletions

View File

@ -64,7 +64,7 @@ diff -Naurd corosync-0.94.orig/exec/ipc.c corosync-trunk/exec/ipc.c
pthread_exit (0);
diff -Naurd corosync-0.94.orig/exec/logsys.c corosync-trunk/exec/logsys.c
--- corosync-0.94.orig/exec/logsys.c 2009-01-23 15:25:30.000000000 +0100
+++ corosync-trunk/exec/logsys.c 2009-03-06 08:09:24.000000000 +0100
+++ corosync-trunk/exec/logsys.c 2009-03-10 09:03:50.000000000 +0100
@@ -112,8 +112,6 @@
static int logsys_facility = LOG_DAEMON;
@ -83,21 +83,45 @@ diff -Naurd corosync-0.94.orig/exec/logsys.c corosync-trunk/exec/logsys.c
static int log_requests_pending = 0;
@@ -875,7 +873,10 @@
@@ -875,11 +873,25 @@
{
pthread_mutex_lock (&logsys_config_mutex);
- logsys_format = format;
+ if (format)
+ format_buffer = format;
+ else
+ format_buffer = "[%6s] %b";
+ if (format_buffer) {
+ free(format_buffer);
+ format_buffer = NULL;
+ }
+
+ if (format) {
+ format_buffer = strdup(format);
+ } else {
+ format_buffer = strdup("[%6s] %b");
+ }
pthread_mutex_unlock (&logsys_config_mutex);
}
+char *logsys_format_get (void)
+{
+ return format_buffer;
+}
+
void logsys_config_facility_set (char *name, unsigned int facility)
{
pthread_mutex_lock (&logsys_config_mutex);
diff -Naurd corosync-0.94.orig/exec/main.c corosync-trunk/exec/main.c
--- corosync-0.94.orig/exec/main.c 2009-02-25 12:14:47.000000000 +0100
+++ corosync-trunk/exec/main.c 2009-03-06 08:38:34.000000000 +0100
+++ corosync-trunk/exec/main.c 2009-03-09 13:59:40.000000000 +0100
@@ -83,7 +83,7 @@
LOG_MODE_OUTPUT_STDERR | LOG_MODE_THREADED | LOG_MODE_FORK,
NULL,
LOG_DAEMON,
- "[%6s] %b",
+ NULL,
1000000);
LOGSYS_DECLARE_SUBSYS ("MAIN", LOG_INFO);
@@ -448,13 +448,6 @@
return (totempg_groups_mcast_joined (corosync_group_handle, iovec, iov_len, guarantee));
}
@ -114,7 +138,7 @@ diff -Naurd corosync-0.94.orig/exec/main.c corosync-trunk/exec/main.c
char *error_string;
diff -Naurd corosync-0.94.orig/exec/mainconfig.c corosync-trunk/exec/mainconfig.c
--- corosync-0.94.orig/exec/mainconfig.c 2009-02-25 12:14:47.000000000 +0100
+++ corosync-trunk/exec/mainconfig.c 2009-03-04 11:14:36.000000000 +0100
+++ corosync-trunk/exec/mainconfig.c 2009-03-09 13:59:40.000000000 +0100
@@ -158,16 +158,14 @@
}
}
@ -126,7 +150,7 @@ diff -Naurd corosync-0.94.orig/exec/mainconfig.c corosync-trunk/exec/mainconfig.
} else
if (strcmp (value, "off") == 0) {
- main_config->logmode &= ~LOG_MODE_DISPLAY_TIMESTAMP;
+ logsys_format_set("[%6s] %b");
+ logsys_format_set(NULL);
} else {
goto parse_error;
}
@ -358,6 +382,18 @@ diff -Naurd corosync-0.94.orig/include/corosync/engine/coroapi.h corosync-trunk/
int (*sync_request) (
char *service_name);
diff -Naurd corosync-0.94.orig/include/corosync/engine/logsys.h corosync-trunk/include/corosync/engine/logsys.h
--- corosync-0.94.orig/include/corosync/engine/logsys.h 2009-01-16 09:59:09.000000000 +0100
+++ corosync-trunk/include/corosync/engine/logsys.h 2009-03-10 09:03:50.000000000 +0100
@@ -97,6 +97,8 @@
extern void logsys_format_set (
char *format);
+extern char *logsys_format_get (void);
+
extern unsigned int logsys_config_subsys_set (
const char *subsys,
unsigned int tags,
diff -Naurd corosync-0.94.orig/include/corosync/ipc_cfg.h corosync-trunk/include/corosync/ipc_cfg.h
--- corosync-0.94.orig/include/corosync/ipc_cfg.h 2009-02-19 03:23:58.000000000 +0100
+++ corosync-trunk/include/corosync/ipc_cfg.h 2009-03-06 11:07:35.000000000 +0100
@ -629,6 +665,42 @@ diff -Naurd corosync-0.94.orig/services/evs.c corosync-trunk/services/evs.c
res = api->totem_mcast (req_exec_evs_mcast_iovec, 3, TOTEM_AGREED);
if (res == 0) {
error = CS_OK;
diff -Naurd corosync-0.94.orig/test/logsysbench.c corosync-trunk/test/logsysbench.c
--- corosync-0.94.orig/test/logsysbench.c 2008-10-30 23:25:56.000000000 +0100
+++ corosync-trunk/test/logsysbench.c 2009-03-09 13:59:40.000000000 +0100
@@ -42,7 +42,7 @@
LOG_MODE_OUTPUT_STDERR | LOG_MODE_THREADED,
NULL,
LOG_DAEMON,
- "[%6s] %b",
+ NULL,
100000);
LOGSYS_DECLARE_NOSUBSYS(LOG_LEVEL_INFO);
diff -Naurd corosync-0.94.orig/test/logsysrec.c corosync-trunk/test/logsysrec.c
--- corosync-0.94.orig/test/logsysrec.c 2008-10-30 23:25:56.000000000 +0100
+++ corosync-trunk/test/logsysrec.c 2009-03-09 13:59:40.000000000 +0100
@@ -39,7 +39,7 @@
LOG_MODE_OUTPUT_STDERR | LOG_MODE_THREADED,
NULL,
LOG_DAEMON,
- "[%6s] %b",
+ NULL,
100000);
LOGSYS_DECLARE_NOSUBSYS(LOG_LEVEL_INFO);
diff -Naurd corosync-0.94.orig/test/logsys_t2.c corosync-trunk/test/logsys_t2.c
--- corosync-0.94.orig/test/logsys_t2.c 2008-10-30 23:25:56.000000000 +0100
+++ corosync-trunk/test/logsys_t2.c 2009-03-09 13:59:40.000000000 +0100
@@ -39,7 +39,7 @@
LOG_MODE_OUTPUT_STDERR | LOG_MODE_THREADED,
NULL,
LOG_DAEMON,
- "[%6s] %b"
+ NULL,
100000);
LOGSYS_DECLARE_NOSUBSYS(LOG_LEVEL_INFO);
diff -Naurd corosync-0.94.orig/tools/corosync-cfgtool.c corosync-trunk/tools/corosync-cfgtool.c
--- corosync-0.94.orig/tools/corosync-cfgtool.c 2009-02-13 10:21:57.000000000 +0100
+++ corosync-trunk/tools/corosync-cfgtool.c 2009-03-06 11:07:35.000000000 +0100

View File

@ -3,7 +3,7 @@
Name: corosync
Summary: The Corosync Cluster Engine and Application Programming Interfaces
Version: 0.94
Release: 4%{?alphatag:.%{alphatag}}%{?dist}
Release: 5%{?alphatag:.%{alphatag}}%{?dist}
License: BSD
Group: System Environment/Base
URL: http://www.openais.org
@ -192,6 +192,9 @@ The Corosync Cluster Engine APIs.
%{_mandir}/man8/votequorum_overview.8*
%changelog
* Tue Mar 10 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.94-5.svn1797
- Update the corosync-trunk patch for real this time.
* Tue Mar 10 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.94-4.svn1797
- Import fixes from upstream:
* Cleanup logsys format init around to use default settings (1795)