From: Kurt Zeilenga Date: Wed, 12 Apr 2000 01:03:51 +0000 (+0000) Subject: #define LDAP_LDIF to default to LDIF input X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3109 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=72c0de5d957003128572eaee7bc51935f333781a;p=openldap #define LDAP_LDIF to default to LDIF input Fix ldaphost == NULL bug --- diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index b6286a1ca6..d9985939fb 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -319,10 +319,14 @@ main( int argc, char **argv ) * has a colon that appears to the left of any equal signs, OR * if the first line consists entirely of digits (an entry id) */ +#ifdef LDAP_LDIF + use_ldif = 1; +#else use_ldif = ( *rbuf == '#' ) || (( p = strchr( rbuf, ':' )) != NULL && ( q = strchr( rbuf, '\n' )) != NULL && p < q && (( q = strchr( rbuf, '=' )) == NULL || p < q )); +#endif start = rbuf; @@ -408,7 +412,7 @@ process_ldif_rec( char *rbuf, int count ) *p++ = '\0'; replicaport = atoi( p ); } - if ( strcasecmp( value, ldaphost ) == 0 && + if ( ldaphost != NULL && strcasecmp( value, ldaphost ) == 0 && replicaport == ldapport ) { use_record = 1; }