From: Pierangelo Masarati Date: Sat, 15 Oct 2005 12:33:04 +0000 (+0000) Subject: fix error message for invalid "uri" args X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~236 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a16521ed4e2fa8e7f5323a30fe459deb62d50dde;p=openldap fix error message for invalid "uri" args --- 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; }