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
accc1724
Commit
accc1724
authored
Aug 18, 1998
by
Kurt Zeilenga
Browse files
Debug level can now be set using multiple flags, values are bitwise OR'ed.
parent
7139d725
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/main.c
View file @
accc1724
...
...
@@ -10,7 +10,7 @@
#include
"slap.h"
#include
"ldapconfig.h"
extern
void
daemon
();
extern
void
slapd_
daemon
();
extern
int
lber_debug
;
extern
char
Versionstr
[];
...
...
@@ -19,7 +19,7 @@ extern char Versionstr[];
* read-only global variables or variables only written by the listener
* thread (after they are initialized) - no need to protect them with a mutex.
*/
int
ldap_debug
;
int
ldap_debug
=
0
;
#ifdef LDAP_DEBUG
int
ldap_syslog
=
LDAP_DEBUG_STATS
;
#else
...
...
@@ -63,7 +63,7 @@ static
usage
(
name
)
char
*
name
;
{
fprintf
(
stderr
,
"usage: %s [-d debuglevel] [-f configfile] [-p portnumber] [-s sysloglevel]
\n
"
,
name
);
fprintf
(
stderr
,
"usage: %s [-d
?|
debuglevel] [-f configfile] [-p portnumber] [-s sysloglevel]
\n
"
,
name
);
}
main
(
argc
,
argv
)
...
...
@@ -105,19 +105,19 @@ main( argc, argv )
LDAP_DEBUG_CONFIG
);
printf
(
"
\t
LDAP_DEBUG_ACL
\t\t
%d
\n
"
,
LDAP_DEBUG_ACL
);
printf
(
"
\t
LDAP_DEBUG_STATS
\t
\t
%d
\n
"
,
printf
(
"
\t
LDAP_DEBUG_STATS
\t
%d
\n
"
,
LDAP_DEBUG_STATS
);
printf
(
"
\t
LDAP_DEBUG_STATS2
\t
\t
%d
\n
"
,
printf
(
"
\t
LDAP_DEBUG_STATS2
\t
%d
\n
"
,
LDAP_DEBUG_STATS2
);
printf
(
"
\t
LDAP_DEBUG_SHELL
\t
\t
%d
\n
"
,
printf
(
"
\t
LDAP_DEBUG_SHELL
\t
%d
\n
"
,
LDAP_DEBUG_SHELL
);
printf
(
"
\t
LDAP_DEBUG_PARSE
\t
\t
%d
\n
"
,
printf
(
"
\t
LDAP_DEBUG_PARSE
\t
%d
\n
"
,
LDAP_DEBUG_PARSE
);
printf
(
"
\t
LDAP_DEBUG_ANY
\t\t
%d
\n
"
,
LDAP_DEBUG_ANY
);
exit
(
0
);
}
else
{
ldap_debug
=
atoi
(
optarg
);
ldap_debug
|
=
atoi
(
optarg
);
lber_debug
=
(
ldap_debug
&
LDAP_DEBUG_BER
);
}
break
;
...
...
@@ -184,7 +184,7 @@ main( argc, argv )
pthread_attr_init
(
&
attr
);
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_DETACHED
);
if
(
pthread_create
(
&
listener_tid
,
attr
,
(
void
*
)
daemon
,
if
(
pthread_create
(
&
listener_tid
,
&
attr
,
(
void
*
)
slapd_
daemon
,
(
void
*
)
port
)
!=
0
)
{
Debug
(
LDAP_DEBUG_ANY
,
"listener pthread_create failed
\n
"
,
0
,
0
,
0
);
...
...
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