Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
François Kooman
OpenLDAP
Commits
714ec82c
Commit
714ec82c
authored
23 years ago
by
Julius Enarusai
Browse files
Options
Downloads
Patches
Plain Diff
Added LDAP_LOG Messages
parent
92d24de6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slurpd/re.c
+58
-0
58 additions, 0 deletions
servers/slurpd/re.c
with
58 additions
and
0 deletions
servers/slurpd/re.c
+
58
−
0
View file @
714ec82c
...
...
@@ -81,9 +81,14 @@ Re_free(
return
0
;
}
if
(
re
->
re_refcnt
>
0
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_WARNING
,
"Re_free: "
"Warning: freeing re (dn: %s) with nonzero refcnt
\n
"
,
re
->
re_dn
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Warning: freeing re (dn: %s) with nonzero refcnt
\n
"
,
re
->
re_dn
,
0
,
0
);
#endif
}
ldap_pvt_thread_mutex_destroy
(
&
re
->
re_mutex
);
...
...
@@ -135,11 +140,19 @@ Re_parse(
int
nreplicas
;
if
(
re
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_ERR
,
"Re_parse: Error: re is NULL
\n
"
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Re_parse: error: re is NULL
\n
"
,
0
,
0
,
0
);
#endif
return
-
1
;
}
if
(
replbuf
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_ERR
,
"Re_parse: Error: replbuf is NULL
\n
"
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Re_parse: error: replbuf is NULL
\n
"
,
0
,
0
,
0
);
#endif
return
-
1
;
}
...
...
@@ -164,9 +177,14 @@ Re_parse(
}
buflen
=
strlen
(
buf
);
if
(
ldif_parse_line
(
buf
,
&
type
,
&
value
,
&
len
)
<
0
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_ERR
,
"Re_parse: Error: malformed replog file
\n
"
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Error: Re_parse: malformed replog file
\n
"
,
0
,
0
,
0
);
#endif
return
-
1
;
}
switch
(
gettype
(
type
))
{
...
...
@@ -193,9 +211,14 @@ Re_parse(
break
;
default:
if
(
!
(
state
==
GOT_ALL
))
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_ERR
,
"Re_parse: Error: bad type <%s>
\n
"
,
type
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Error: Re_parse: bad type <%s>
\n
"
,
type
,
0
,
0
);
#endif
free
(
type
);
if
(
value
!=
NULL
)
free
(
value
);
...
...
@@ -208,9 +231,14 @@ Re_parse(
}
if
(
state
!=
GOT_ALL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_ERR
,
"Re_parse: Error: malformed replog file
\n
"
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Error: Re_parse: malformed replog file
\n
"
,
0
,
0
,
0
);
#endif
return
-
1
;
}
...
...
@@ -226,9 +254,14 @@ Re_parse(
value
=
NULL
;
}
else
{
if
(
ldif_parse_line
(
buf
,
&
type
,
&
value
,
&
len
)
<
0
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_ERR
,
"Re_parse: Error: malformed replog line
\"
%s
\"\n
"
,
buf
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Error: malformed replog line
\"
%s
\"\n
"
,
buf
,
0
,
0
);
#endif
return
-
1
;
}
}
...
...
@@ -340,8 +373,13 @@ get_repl_hosts(
rh
=
(
Rh
*
)
ch_realloc
((
char
*
)
rh
,
(
nreplicas
+
2
)
*
sizeof
(
Rh
));
if
(
rh
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_ERR
,
"get_repl_hosts: Out of memory
\n
"
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Out of memory in get_repl_hosts
\n
"
,
0
,
0
,
0
);
#endif
return
NULL
;
}
rh
[
nreplicas
].
rh_hostname
=
strdup
(
value
);
...
...
@@ -457,7 +495,11 @@ Re_dump(
Mi
*
mi
;
if
(
re
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_ERR
,
"Re_dump: re is NULL
\n
"
));
#else
Debug
(
LDAP_DEBUG_TRACE
,
"Re_dump: re is NULL
\n
"
,
0
,
0
,
0
);
#endif
return
;
}
fprintf
(
fp
,
"Re_dump: ******
\n
"
);
...
...
@@ -523,8 +565,13 @@ Re_write(
int
rc
=
0
;
if
(
re
==
NULL
||
fp
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_ERR
,
"Re_write: Internal error: NULL argument
\n
"
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Internal error: Re_write: NULL argument
\n
"
,
0
,
0
,
0
);
#endif
return
-
1
;
}
...
...
@@ -612,8 +659,13 @@ Re_write(
}
bad:
if
(
rc
!=
0
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_ERR
,
"Re_write: Error while writing: %s
\n
"
,
sys_errlist
[
errno
]
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Error while writing: %s
\n
"
,
sys_errlist
[
errno
],
0
,
0
);
#endif
}
return
rc
;
}
...
...
@@ -750,9 +802,15 @@ warn_unknown_replica(
}
}
if
(
!
found
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"re"
,
LDAP_LEVEL_WARNING
,
"warn_unknown_replica: "
"Warning: unknown replica %s:%d found in replication log
\n
"
,
host
,
port
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"Warning: unknown replica %s:%d found in replication log
\n
"
,
host
,
port
,
0
);
#endif
nur
++
;
ur
=
(
Rh
*
)
ch_realloc
(
(
char
*
)
ur
,
(
nur
*
sizeof
(
Rh
)));
ur
[
nur
-
1
].
rh_hostname
=
strdup
(
host
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment