diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2007-06-11 17:22:38 +0000 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2007-06-11 17:22:38 +0000 |
commit | 3c6758091e1d5bd2eaec52981410d7a01cb2bfa5 (patch) | |
tree | 32d0bc7b007fb8033cb6c6e721f851ebb545a068 /ldap/servers/slapd/entry.c | |
parent | 941ed15d730bb365a5b056b37c81eccd10ca3c61 (diff) | |
download | ds-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/servers/slapd/entry.c')
-rw-r--r-- | ldap/servers/slapd/entry.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c index 0ae4b4fb..31e2cb08 100644 --- a/ldap/servers/slapd/entry.c +++ b/ldap/servers/slapd/entry.c @@ -203,27 +203,17 @@ str2entry_fast( char *s, int flags, int read_stateinfo ) int maxvals; int del_maxvals; char *type; - char *errmsg = NULL; if ( *s == '\n' || *s == '\0' ) { break; } - if ( (retmalloc = ldif_parse_line( s, &type, &valuecharptr, &valuelen, &errmsg )) < 0 ) { - if ( errmsg != NULL ) { - LDAPDebug( LDAP_DEBUG_PARSE, "%s", errmsg, 0, 0 ); - /* the memory below was not allocated by the slapi_ch_ functions */ - PR_smprintf_free(errmsg ); - } + if ( (retmalloc = ldif_parse_line( s, &type, &valuecharptr, &valuelen )) < 0 ) { LDAPDebug( LDAP_DEBUG_TRACE, "<= str2entry_fast NULL (parse_line)\n", 0, 0, 0 ); continue; } - /* We don't use errmsg anywhere later. free it to avoid leaking... */ - /* the memory below was not allocated by the slapi_ch_ functions */ - slapi_ch_free( (void**)&errmsg ); - /* * Extract the attribute and value CSNs from the attribute type. */ @@ -581,7 +571,6 @@ str2entry_dupcheck( char *s, int flags, int read_stateinfo ) int i, j; char *next=NULL; char *valuecharptr=NULL; - char *errmsg = NULL; int retmalloc = 0; int rc; int fast_dup_check = 0; @@ -617,21 +606,12 @@ str2entry_dupcheck( char *s, int flags, int read_stateinfo ) break; } - if ( (retmalloc = ldif_parse_line( s, &type, &valuecharptr, &valuelen, &errmsg )) < 0 ) { - if ( errmsg != NULL ) { - LDAPDebug( LDAP_DEBUG_PARSE, "%s", errmsg, 0, 0 ); - /* the memory below was not allocated by the slapi_ch_ functions */ - PR_smprintf_free(errmsg ); - } + if ( (retmalloc = ldif_parse_line( s, &type, &valuecharptr, &valuelen )) < 0 ) { LDAPDebug( LDAP_DEBUG_TRACE, "<= slapi_str2entry NULL (parse_line)\n", 0, 0, 0 ); continue; } - /* We don't use errmsg anywhere later. free it to avoid leaking... */ - /* the memory below was not allocated by the slapi_ch_ functions */ - slapi_ch_free( (void**)&errmsg ); - /* * Extract the attribute and value CSNs from the attribute type. */ |