]> git.sur5r.net Git - openldap/commitdiff
fix error message for invalid "uri" args
authorPierangelo Masarati <ando@openldap.org>
Sat, 15 Oct 2005 12:33:04 +0000 (12:33 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 15 Oct 2005 12:33:04 +0000 (12:33 +0000)
servers/slapd/back-meta/config.c

index aeba81e1db57f6d06c14b486eb57b5dbba0c6259..18f3a772d96646dbb84d57fd57efcff6d0be0849 100644 (file)
@@ -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 <protocol>://<server>[:port]/<naming context>\" line\n",
+       "%s: line %d: missing URI "
+       "in \"uri <protocol>://<server>[:port]/<naming context>\" line\n",
+                               fname, lineno );
+                       return 1;
+
+               case 2:
+                       break;
+
+               default:
+                       fprintf( stderr,
+       "%s: line %d: too many args "
+       "in \"uri <protocol>://<server>[:port]/<naming context>\" line\n",
                                fname, lineno );
                        return 1;
                }