From a16521ed4e2fa8e7f5323a30fe459deb62d50dde Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 15 Oct 2005 12:33:04 +0000 Subject: [PATCH] fix error message for invalid "uri" args --- servers/slapd/back-meta/config.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-meta/config.c b/servers/slapd/back-meta/config.c index aeba81e1db..18f3a772d9 100644 --- a/servers/slapd/back-meta/config.c +++ b/servers/slapd/back-meta/config.c @@ -113,10 +113,21 @@ meta_back_db_config( int rc; int c; - if ( argc != 2 ) { + switch ( argc ) { + case 1: fprintf( stderr, - "%s: line %d: missing address" - " in \"uri ://[:port]/\" line\n", + "%s: line %d: missing URI " + "in \"uri ://[:port]/\" line\n", + fname, lineno ); + return 1; + + case 2: + break; + + default: + fprintf( stderr, + "%s: line %d: too many args " + "in \"uri ://[:port]/\" line\n", fname, lineno ); return 1; } -- 2.39.5