From 1a8543da6d4180660675569b6804cc801c59c7c9 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 2 Jan 2002 22:46:10 +0000 Subject: [PATCH] Fix for attr_merge --- servers/slapd/back-monitor/init.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index af02f84588..072f486cf8 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -222,7 +222,7 @@ monitor_back_db_init( char buf[1024], *end_of_line; struct berval dn, *ndn; const char *text; - struct berval val, *bv[2] = { &val, NULL }; + struct berval bv[2]; /* * database monitor can be defined once only @@ -403,12 +403,13 @@ monitor_back_db_init( #endif return( -1 ); } - val.bv_val = (char *) Versionstr; + bv[1].bv_val = NULL; + bv[0].bv_val = (char *) Versionstr; end_of_line = strchr( Versionstr, '\n' ); if ( end_of_line ) { - val.bv_len = end_of_line - Versionstr; + bv[0].bv_len = end_of_line - Versionstr; } else { - val.bv_len = strlen( Versionstr ); + bv[0].bv_len = strlen( Versionstr ); } if ( attr_merge( e, monitor_ad_desc, bv ) ) { #ifdef NEW_LOGGING -- 2.39.5