[Fedora-directory-commits] ldapserver/ldap/admin/lib dsalib_confs.c, 1.7, 1.8
Noriko Hosoi (nhosoi)
fedora-directory-commits at redhat.com
Mon Jun 11 17:22:39 UTC 2007
- Previous message (by thread): [Fedora-directory-commits] ldapserver aclocal.m4, 1.34, 1.35 configure, 1.45, 1.46 missing, 1.26, 1.27 install-sh, 1.26, 1.27 depcomp, 1.26, 1.27 compile, 1.26, 1.27 Makefile.in, 1.49, 1.50 config.sub, 1.25, 1.26 config.guess, 1.25, 1.26
- Next message (by thread): [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_api.c, 1.14, 1.15 replutil.c, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/lib
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11857/ldap/admin/lib
Modified Files:
dsalib_confs.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: dsalib_confs.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/lib/dsalib_confs.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- dsalib_confs.c 10 Nov 2006 23:44:32 -0000 1.7
+++ dsalib_confs.c 11 Jun 2007 17:22:37 -0000 1.8
@@ -78,22 +78,16 @@
char *type, *value;
int vlen = 0;
int rc;
- char *errmsg = NULL;
if ( *line == '\n' || *line == '\0' ) {
break;
}
/* this call modifies line */
- rc = ldif_parse_line(line, &type, &value, &vlen, &errmsg);
+ rc = ldif_parse_line(line, &type, &value, &vlen);
if (rc != 0)
{
- if ( errmsg != NULL ) {
- ds_send_error(errmsg, 0);
- PR_smprintf_free(errmsg);
- } else {
ds_send_error("Unknown error processing config file", 0);
- }
free(begin);
return NULL;
}
@@ -160,7 +154,7 @@
* Use ldif_parse_line() so continuation markers are
* handled correctly, etc.
*/
- char *errmsg, *type = NULL, *value = NULL, *tmpvalue = NULL;
+ char *type = NULL, *value = NULL, *tmpvalue = NULL;
int ldif_rc, tmpvlen = 0;
char *tmpline = strdup(line);
@@ -171,19 +165,15 @@
return(NULL);
}
- ldif_rc = ldif_parse_line( tmpline, &type, &tmpvalue,
- &tmpvlen, &errmsg );
+ ldif_rc = ldif_parse_line( tmpline, &type, &tmpvalue, &tmpvlen );
if (ldif_rc < 0) {
- ds_send_error(errmsg, 0 /* do not print errno */);
+ ds_send_error("Unknown error processing config file", 0);
} else if (ldif_rc == 0) { /* value returned in place */
value = strdup(tmpvalue);
} else { /* malloc'd value */
value = tmpvalue;
}
free(tmpline);
- if (errmsg) {
- PR_smprintf_free(errmsg);
- }
return value;
}
}
- Previous message (by thread): [Fedora-directory-commits] ldapserver aclocal.m4, 1.34, 1.35 configure, 1.45, 1.46 missing, 1.26, 1.27 install-sh, 1.26, 1.27 depcomp, 1.26, 1.27 compile, 1.26, 1.27 Makefile.in, 1.49, 1.50 config.sub, 1.25, 1.26 config.guess, 1.25, 1.26
- Next message (by thread): [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_api.c, 1.14, 1.15 replutil.c, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-directory-commits
mailing list