]> git.pld-linux.org Git - packages/openchange.git/blame - samba-4.2.patch
- release 50 (by relup.sh)
[packages/openchange.git] / samba-4.2.patch
CommitLineData
db79d4b2
JR
1diff -up openchange-openchange-2.3-VULCAN/libmapi/cdo_mapi.c.samba-4.2.0-rc2 openchange-openchange-2.3-VULCAN/libmapi/cdo_mapi.c
2--- openchange-openchange-2.3-VULCAN/libmapi/cdo_mapi.c.samba-4.2.0-rc2 2015-12-03 11:20:17.502119228 +0100
3+++ openchange-openchange-2.3-VULCAN/libmapi/cdo_mapi.c 2015-12-03 11:20:44.524118102 +0100
4@@ -337,6 +337,9 @@ _PUBLIC_ enum MAPISTATUS SetMAPIDebugLev
5 ret = lpcfg_set_cmdline(mapi_ctx->lp_ctx, "log level", debuglevel);
6 talloc_free(debuglevel);
7
8+ if (ret)
9+ _oc_log_samba_level = level;
10+
11 return (ret == true) ? MAPI_E_SUCCESS : MAPI_E_INVALID_PARAMETER;
12 }
13
14diff -up openchange-openchange-2.3-VULCAN/libmapi/oc_log.c.samba-4.2.0-rc2 openchange-openchange-2.3-VULCAN/libmapi/oc_log.c
15--- openchange-openchange-2.3-VULCAN/libmapi/oc_log.c.samba-4.2.0-rc2 2015-12-03 11:11:01.801142393 +0100
16+++ openchange-openchange-2.3-VULCAN/libmapi/oc_log.c 2015-12-03 11:27:22.921101494 +0100
17@@ -20,7 +20,9 @@
18 */
19
20 #include "libmapi/libmapi.h"
21-#include <util/debug.h>
22+#include <stdio.h>
23+
24+int _oc_log_samba_level = 0;
25
26 void oc_log(enum oc_log_level level, const char *fmt_string, ...)
27 {
28@@ -47,12 +49,16 @@ void oc_logv(enum oc_log_level level, co
29 samba_level = 0;
30 }
31
32+ if (samba_level && !(_oc_log_samba_level & samba_level))
33+ return;
34+
35 /* Add a trailing newline if one is not already present */
36 if (line[strlen(line)-1] == '\n') {
37- DEBUG(samba_level, ("%s", line));
38+ fprintf(stderr, "%s", line);
39 } else {
40- DEBUG(samba_level, ("%s\n", line));
41+ fprintf(stderr, "%s\n", line);
42 }
43+ fflush(stderr);
44 }
45
46 void oc_log_init_stdout()
47diff -up openchange-openchange-2.3-VULCAN/libmapi/oc_log.h.samba-4.2.0-rc2 openchange-openchange-2.3-VULCAN/libmapi/oc_log.h
48--- openchange-openchange-2.3-VULCAN/libmapi/oc_log.h.samba-4.2.0-rc2 2015-12-03 11:18:27.407123817 +0100
49+++ openchange-openchange-2.3-VULCAN/libmapi/oc_log.h 2015-12-03 11:20:19.228119156 +0100
50@@ -77,4 +77,6 @@ void oc_log_init_user(const char *progna
51 defaulting to /var/log/openchange.log */
52 void oc_log_init_server(const char *progname, struct loadparm_context *lp_ctx);
53
54+extern int _oc_log_samba_level; /* Private, do not change it other than by SetMAPIDebugLevel() */
55+
56 #endif /* _OC_LOG_H_ */
57diff -up openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/fault_util.c.samba-4.2.0-rc2 openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/fault_util.c
58--- openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/fault_util.c.samba-4.2.0-rc2 2015-12-03 11:11:17.337141745 +0100
59+++ openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/fault_util.c 2015-12-03 11:27:46.505100511 +0100
60@@ -30,14 +30,14 @@
61 #include "fault_util.h"
62 #include "libmapi/libmapi.h"
63 #include "libmapi/libmapi_private.h"
64-#include <util/debug.h>
65+#include <stdio.h>
66
67 #include <samba/version.h>
68
69 #include <execinfo.h>
70
71 /**
72- \details print a backtrace using DEBUG() macro.
73+ \details print a backtrace (*not* using DEBUG() macro).
74
75 */
76 _PUBLIC_ void debug_print_backtrace(int dbg_level)
77@@ -47,16 +47,19 @@ _PUBLIC_ void debug_print_backtrace(int
78 size_t backtrace_size;
79 char **backtrace_strings;
80
81+ if (!(_oc_log_samba_level & dbg_level))
82+ return;
83+
84 backtrace_size = backtrace(backtrace_stack, BACKTRACE_SIZE);
85 backtrace_strings = backtrace_symbols(backtrace_stack, backtrace_size);
86
87- DEBUG(dbg_level, ("BACKTRACE: %lu stack frames:\n", (unsigned long)backtrace_size));
88+ fprintf(stderr, "BACKTRACE: %lu stack frames:\n", (unsigned long)backtrace_size);
89
90 if (backtrace_strings) {
91 int i;
92
93 for (i = 0; i < backtrace_size; i++) {
94- DEBUGADD(dbg_level, (" #%.2u %s\n", i, backtrace_strings[i]));
95+ fprintf(stderr, " #%.2u %s\n", i, backtrace_strings[i]);
96 }
97
98 free(backtrace_strings);
99diff -up openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/fault_util.h.samba-4.2.0-rc2 openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/fault_util.h
100--- openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/fault_util.h.samba-4.2.0-rc2 2015-12-03 11:11:37.089140922 +0100
101+++ openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/fault_util.h 2015-12-03 11:26:38.633103340 +0100
102@@ -28,7 +28,7 @@
103 * It will print information about the error and if is_fatal is true abort()
104 * will be called.
105 *
106- * DEBUG macro will be used to print a report with the following format:
107+ * DEBUG macro will *not* be used to print a report with the following format:
108 * @code
109 * ==================================
110 * OPENCHANGE INTERNAL ERROR: pid 123
111@@ -59,9 +59,10 @@
112 * @see DEBUG()
113 */
114 #define OC_PANIC( is_fatal, body ) \
115- DEBUGSEP(0); \
116- DEBUG(0, ("OPENCHANGE INTERNAL ERROR: pid %d\n", (int)getpid())); \
117- DEBUG(0, body); \
118+ fprintf(stderr,"\n"); \
119+ fprintf(stderr, "OPENCHANGE INTERNAL ERROR: pid %d\n", (int)getpid()); \
120+ fprintf(stderr, body); \
121+ fflush(stderr); \
122 openchange_abort(is_fatal);
123
124 #ifndef __BEGIN_DECLS
125diff -up openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/mapi_handles.c.samba-4.2.0-rc2 openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/mapi_handles.c
126--- openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/mapi_handles.c.samba-4.2.0-rc2 2015-12-03 11:12:08.457139614 +0100
127+++ openchange-openchange-2.3-VULCAN/mapiproxy/libmapiproxy/mapi_handles.c 2015-12-03 11:26:50.473102847 +0100
128@@ -429,7 +429,7 @@ static int mapi_handles_traverse_delete(
129 OC_DEBUG(5, "handles being released must NOT have child handles attached to them (%s is a child of %s)", handle_str, container_handle_str);
130 handle = strtol((const char *) handle_str, NULL, 16);
131 /* abort(); */
132- /* DEBUG(5, ("deleting child handle: %d, %s\n", handle, handle_str)); */
133+ /* OC_DEBUG(5, ("deleting child handle: %d, %s\n", handle, handle_str)); */
134 mapi_handles_delete(handles_private->handles_ctx, handle);
135 }
136
This page took 0.140909 seconds and 4 git commands to generate.