Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
16d3ad01
Commit
16d3ad01
authored
Oct 06, 2009
by
Pierangelo Masarati
Browse files
don't "overflow" debug levels (ITS#6324)
parent
3fd07415
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/ldap_log.h
View file @
16d3ad01
...
...
@@ -123,7 +123,7 @@ LDAP_BEGIN_DECL
#define LDAP_DEBUG_SYNC 0x4000
#define LDAP_DEBUG_NONE 0x8000
#define LDAP_DEBUG_ANY -1
#define LDAP_DEBUG_ANY
((unsigned long)
-1
)
/* debugging stuff */
#ifdef LDAP_DEBUG
...
...
servers/slapd/bconfig.c
View file @
16d3ad01
...
...
@@ -3051,7 +3051,7 @@ static int
loglevel_init
(
void
)
{
slap_verbmasks
lo
[]
=
{
{
BER_BVC
(
"Any"
),
-
1
},
{
BER_BVC
(
"Any"
),
LDAP_DEBUG_ANY
},
{
BER_BVC
(
"Trace"
),
LDAP_DEBUG_TRACE
},
{
BER_BVC
(
"Packets"
),
LDAP_DEBUG_PACKETS
},
{
BER_BVC
(
"Args"
),
LDAP_DEBUG_ARGS
},
...
...
servers/slapd/main.c
View file @
16d3ad01
...
...
@@ -270,7 +270,18 @@ parse_debug_level( const char *arg, int *levelp, char ***unknowns )
ldap_charray_free
(
levels
);
}
else
{
if
(
lutil_atoix
(
&
level
,
arg
,
0
)
!=
0
)
{
int
rc
;
if
(
arg
[
0
]
==
'-'
)
{
rc
=
lutil_atoix
(
&
level
,
arg
,
0
);
}
else
{
unsigned
ulevel
;
rc
=
lutil_atoux
(
&
ulevel
,
arg
,
0
);
level
=
(
int
)
ulevel
;
}
if
(
rc
)
{
fprintf
(
stderr
,
"unrecognized log level "
"
\"
%s
\"\n
"
,
arg
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment