summaryrefslogtreecommitdiffstats
path: root/ldap/admin
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2007-06-11 17:22:38 +0000
committerNoriko Hosoi <nhosoi@redhat.com>2007-06-11 17:22:38 +0000
commit3c6758091e1d5bd2eaec52981410d7a01cb2bfa5 (patch)
tree32d0bc7b007fb8033cb6c6e721f851ebb545a068 /ldap/admin
parent941ed15d730bb365a5b056b37c81eccd10ca3c61 (diff)
downloadds-3c6758091e1d5bd2eaec52981410d7a01cb2bfa5.tar.gz
ds-3c6758091e1d5bd2eaec52981410d7a01cb2bfa5.tar.xz
ds-3c6758091e1d5bd2eaec52981410d7a01cb2bfa5.zip
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.
Diffstat (limited to 'ldap/admin')
-rw-r--r--ldap/admin/lib/dsalib_confs.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/ldap/admin/lib/dsalib_confs.c b/ldap/admin/lib/dsalib_confs.c
index 0a2023ce..bce1594b 100644
--- a/ldap/admin/lib/dsalib_confs.c
+++ b/ldap/admin/lib/dsalib_confs.c
@@ -78,22 +78,16 @@ ds_get_conf_from_file(FILE *conf)
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 @@ ds_get_value(char **ds_config, char *parm, int phase, int occurance)
* 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 @@ ds_get_value(char **ds_config, char *parm, int phase, int occurance)
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;
}
}