Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication
In directory
cvs-int.fedora.redhat.com:/tmp/cvs-serv11857/ldap/servers/plugins/replication
Modified Files:
cl5_api.c replutil.c
Log Message:
Resolves: #243488
Summary: Use mozldap6 ldif_parse_line API
Changes:
1) Removed ldif.h from the DS tree.
2) Eliminated the 5-th arg of ldif_parse_line (errmsg) and the errmsg related
code.
Index: cl5_api.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_api.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- cl5_api.c 15 Mar 2007 21:40:34 -0000 1.14
+++ cl5_api.c 11 Jun 2007 17:22:37 -0000 1.15
@@ -4988,21 +4988,15 @@
next = ldifEntry;
while ((line = ldif_getline(&next)) != NULL)
{
- char *errmsg = NULL;
-
if ( *line == '\n' || *line == '\0' )
{
break;
}
/* this call modifies ldifEntry */
- rc = ldif_parse_line(line, &type, &value, &vlen, &errmsg);
+ rc = ldif_parse_line(line, &type, &value, &vlen);
if (rc != 0)
{
- if ( errmsg != NULL ) {
- slapi_log_error(SLAPI_LOG_PARSE, repl_plugin_name_cl, "%s", errmsg);
- PR_smprintf_free(errmsg );
- }
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
"_cl5LDIF2Operation: warning - failed to parse ldif line\n");
continue;
Index: replutil.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/replutil.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- replutil.c 10 Nov 2006 23:45:17 -0000 1.9
+++ replutil.c 11 Jun 2007 17:22:37 -0000 1.10
@@ -428,8 +428,6 @@
slapi_mod_init (&mod, 0);
while (line)
{
- char * errmsg = NULL;
-
if (strcasecmp (line, "-") == 0)
{
if (slapi_mod_isvalid (&mod))
@@ -446,14 +444,10 @@
break;
}
- rc = ldif_parse_line(line, &type, &value, &vlen, &errmsg);
+ rc = ldif_parse_line(line, &type, &value, &vlen);
if (rc != 0)
{
/* ONREPL - log warning */
- if ( errmsg != NULL ) {
- slapi_log_error( SLAPI_LOG_PARSE, repl_plugin_name, "%s", errmsg );
- PR_smprintf_free(errmsg );
- }
slapi_log_error( SLAPI_LOG_REPL, repl_plugin_name,
"Failed to parse the ldif line.\n");
continue;
Show replies by thread