Skip to content
Snippets Groups Projects
Commit 0fa9578f authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

handle when URIs are null

parent dc166c08
No related branches found
No related tags found
No related merge requests found
......@@ -361,19 +361,22 @@ monitor_subsys_database_init(
li->li_bvuri, NULL );
#else
char **urls = ldap_str2charray( li->li_uri, " " );
int u;
for ( u = 0; urls[ u ] != NULL; u++ ) {
struct berval bv;
if ( urls != NULL ) {
int u;
for ( u = 0; urls[ u ] != NULL; u++ ) {
struct berval bv;
ber_str2bv( urls[ u ], 0, 0, &bv );
ber_str2bv( urls[ u ], 0, 0, &bv );
attr_merge_normalize_one( e,
attr_merge_normalize_one( e,
slap_schema.si_ad_labeledURI,
&bv, NULL );
}
}
ldap_charray_free( urls );
ldap_charray_free( urls );
}
#endif
#endif /* defined(SLAPD_LDAP) */
......@@ -384,18 +387,21 @@ monitor_subsys_database_init(
for ( t = 0; t < mi->mi_ntargets; t++ ) {
char **urls = ldap_str2charray( mi->mi_targets[ t ].mt_uri, " " );
int u;
for ( u = 0; urls[ u ] != NULL; u++ ) {
struct berval bv;
if ( urls != NULL ) {
int u;
ber_str2bv( urls[ u ], 0, 0, &bv );
for ( u = 0; urls[ u ] != NULL; u++ ) {
struct berval bv;
attr_merge_normalize_one( e,
slap_schema.si_ad_labeledURI,
&bv, NULL );
ber_str2bv( urls[ u ], 0, 0, &bv );
attr_merge_normalize_one( e,
slap_schema.si_ad_labeledURI,
&bv, NULL );
}
ldap_charray_free( urls );
}
ldap_charray_free( urls );
}
#endif /* defined(SLAPD_META) */
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment