]> git.pld-linux.org Git - packages/monit.git/blame - monit-4.8-patch01.patch
- use functions
[packages/monit.git] / monit-4.8-patch01.patch
CommitLineData
7bda5d42
ER
1Index: CHANGES.txt
2===================================================================
3RCS file: /sources/monit/monit/CHANGES.txt,v
4retrieving revision 1.296
5retrieving revision 1.298
6diff -u -r1.296 -r1.298
7--- CHANGES.txt 27 Apr 2006 21:48:34 -0000 1.296
8+++ CHANGES.txt 4 May 2006 23:54:33 -0000 1.298
9@@ -1,7 +1,18 @@
10- CHANGES version 4.8
11+ CHANGES version 4.8.1
12
13 This file summarizes changes made since 3.0
14
15+Version 4.8.1
16+
17+BUGFIXES:
18+* Fix the RHEL4 x86-64 related crash in logging introduced
19+ in 4.8. This problem may probably occur on other Opteron
20+ based platforms as well. Thanks to Mike Jackson
21+ ( mjackson mightymerchant , com ) for report and helping
22+ with the patch. This fix should also apply to 64-bit PPC
23+ platforms as well.
24+
25+
26 Version 4.8
27
28 NEW FEATURES AND FUNCTIONS:
29Index: log.c
30===================================================================
31RCS file: /sources/monit/monit/log.c,v
32retrieving revision 1.27
33retrieving revision 1.30
34diff -u -r1.27 -r1.30
35--- log.c 27 Apr 2006 20:56:41 -0000 1.27
36+++ log.c 4 May 2006 23:50:03 -0000 1.30
37@@ -80,7 +80,7 @@
38 *
39 * @author Jan-Henrik Haukeland, <hauk@tildeslash.com>
40 *
41- * @version \$Id$
42+ * @version \$Id$
43 *
44 * @file
45 */
46@@ -359,10 +359,20 @@
47 */
48 static void log_log(int priority, const char *s, va_list ap) {
49
50+#ifdef HAVE_VA_COPY
51+ va_list ap_copy;
52+#endif
53+
54 ASSERT(s);
55
56 LOCK(log_mutex)
57+#ifdef HAVE_VA_COPY
58+ va_copy(ap_copy, ap);
59+ vfprintf(stderr, s, ap_copy);
60+ va_end(ap_copy);
61+#else
62 vfprintf(stderr, s, ap);
63+#endif
64 fflush(stderr);
65 END_LOCK;
66
67@@ -371,15 +381,28 @@
68
69 if(Run.use_syslog) {
70 LOCK(log_mutex)
71+#ifdef HAVE_VA_COPY
72+ va_copy(ap_copy, ap);
73+ vsyslog(priority, s, ap_copy);
74+ va_end(ap_copy);
75+#else
76 vsyslog(priority, s, ap);
77+#endif
78 END_LOCK;
79 } else if(LOG) {
80 LOCK(log_mutex)
81 fprintf(LOG, "[%s] %-8s : ",
82 timefmt(datetime, STRLEN),
83 logPriorityDescription(priority));
84+#ifdef HAVE_VA_COPY
85+ va_copy(ap_copy, ap);
86+ vfprintf(LOG, s, ap_copy);
87+ va_end(ap_copy);
88+#else
89 vfprintf(LOG, s, ap);
90+#endif
91 END_LOCK;
92+
93 }
94 }
95 }
This page took 0.067593 seconds and 4 git commands to generate.