Import fixes from upstream

This commit is contained in:
Fabio M. Di Nitto 2009-03-06 07:30:44 +00:00
parent b824c75d3c
commit 7231083a28
2 changed files with 94 additions and 2 deletions

82
corosync-trunk.diff Normal file
View File

@ -0,0 +1,82 @@
diff -Naurd corosync-0.94/exec/logsys.c corosync-trunk/exec/logsys.c
--- corosync-0.94/exec/logsys.c 2009-01-23 15:25:30.000000000 +0100
+++ corosync-trunk/exec/logsys.c 2009-03-05 06:36:07.000000000 +0100
@@ -112,8 +112,6 @@
static int logsys_facility = LOG_DAEMON;
-static char *logsys_format = NULL;
-
/*
* operating global variables
*/
@@ -139,7 +137,7 @@
static int logsys_buffer_full = 0;
-static char *format_buffer="[%6s] %b";
+static char *format_buffer=NULL;
static int log_requests_pending = 0;
@@ -875,7 +873,10 @@
{
pthread_mutex_lock (&logsys_config_mutex);
- logsys_format = format;
+ if (format)
+ format_buffer = format;
+ else
+ format_buffer = "[%6s] %b";
pthread_mutex_unlock (&logsys_config_mutex);
}
diff -Naurd corosync-0.94/exec/mainconfig.c corosync-trunk/exec/mainconfig.c
--- corosync-0.94/exec/mainconfig.c 2009-02-25 12:14:47.000000000 +0100
+++ corosync-trunk/exec/mainconfig.c 2009-03-04 11:14:36.000000000 +0100
@@ -158,16 +158,14 @@
}
}
if (!objdb_get_string (objdb,object_service_handle, "timestamp", &value)) {
-/* todo change format string
if (strcmp (value, "on") == 0) {
- main_config->logmode |= LOG_MODE_DISPLAY_TIMESTAMP;
+ logsys_format_set("%t [%6s] %b");
} else
if (strcmp (value, "off") == 0) {
- main_config->logmode &= ~LOG_MODE_DISPLAY_TIMESTAMP;
+ logsys_format_set("[%6s] %b");
} else {
goto parse_error;
}
-*/
}
/* free old string on reload */
diff -Naurd corosync-0.94/exec/Makefile corosync-trunk/exec/Makefile
diff -Naurd corosync-0.94/exec/totemip.c corosync-trunk/exec/totemip.c
--- corosync-0.94/exec/totemip.c 2009-01-26 21:46:45.000000000 +0100
+++ corosync-trunk/exec/totemip.c 2009-03-03 04:57:37.000000000 +0100
@@ -406,6 +406,7 @@
memset(&nladdr, 0, sizeof(nladdr));
nladdr.nl_family = AF_NETLINK;
+ memset(&req, 0, sizeof(req));
req.nlh.nlmsg_len = sizeof(req);
req.nlh.nlmsg_type = RTM_GETADDR;
req.nlh.nlmsg_flags = NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST;
diff -Naurd corosync-0.94/lib/Makefile corosync-trunk/lib/Makefile
diff -Naurd corosync-0.94/Makefile corosync-trunk/Makefile
diff -Naurd corosync-0.94/services/cpg.c corosync-trunk/services/cpg.c
--- corosync-0.94/services/cpg.c 2009-03-03 01:57:44.000000000 +0100
+++ corosync-trunk/services/cpg.c 2009-03-06 03:42:48.000000000 +0100
@@ -489,8 +489,8 @@
notify_info.nodeid = api->totem_nodeid_get();
notify_info.reason = CONFCHG_CPG_REASON_PROCDOWN;
cpg_node_joinleave_send(gi, pi, MESSAGE_REQ_EXEC_CPG_PROCLEAVE, CONFCHG_CPG_REASON_PROCDOWN);
- list_del(&pi->list);
}
+ list_del(&pi->list);
api->ipc_refcnt_dec (conn);
return (0);
}

View File

@ -1,14 +1,15 @@
## define alphatag svn1756
%define alphatag svn1792
Name: corosync
Summary: The Corosync Cluster Engine and Application Programming Interfaces
Version: 0.94
Release: 1%{?alphatag:.%{alphatag}}%{?dist}
Release: 2%{?alphatag:.%{alphatag}}%{?dist}
License: BSD
Group: System Environment/Base
URL: http://www.openais.org
Source0: http://developer.osdl.org/dev/openais/downloads/corosync-%{version}/corosync-%{version}.tar.gz
Patch0: corosync-bump-soname.diff
Patch1: corosync-trunk.diff
# Runtime bits
Requires: corosynclib = %{version}-%{release}
@ -25,6 +26,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%prep
%setup -q -n corosync-%{version}
%patch0 -p1
%patch1 -p1
%build
@ -188,6 +190,14 @@ The Corosync Cluster Engine APIs.
%{_mandir}/man8/votequorum_overview.8*
%changelog
* Fri Mar 6 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.94-2.svn1792
- Import fixes from upstream:
* Fix uninitialized memory. Spotted by valgrind (1788)
* Fix logsys_set_format by updating the right bits (1789)
* logsys: re-add support for timestamp (1790)
* Fix cpg crash (1791)
* Allow logsys_format_set to reset to default (1792)
* Tue Mar 3 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.94-1
- New upstream release.
- Drop obsolete patches.