]> git.sur5r.net Git - openldap/commitdiff
fix previous commit
authorPierangelo Masarati <ando@openldap.org>
Tue, 25 May 2004 13:35:04 +0000 (13:35 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 25 May 2004 13:35:04 +0000 (13:35 +0000)
servers/slapd/main.c

index c66fce701e5ffb093f09b4dddad8b5787a2c5cf5..7cd20669e60aa3658436f1cedf6c635ec3742d2c 100644 (file)
@@ -190,8 +190,7 @@ usage( char *name )
                "\t-l facility\tSyslog facility (default: LOCAL4)\n"
 #endif
                "\t-n serverName\tService name\n"
-               "\t-o <option>[=value]\n"
-               "\t\t\tGeneric means to specify options; see slapd(8) for details\n"
+               "\t-o <opt>[=val]\tGeneric means to specify options; details in slapd(8)\n"
 #ifdef HAVE_CHROOT
                "\t-r directory\tSandbox directory to chroot to\n"
 #endif
@@ -405,9 +404,14 @@ int main( int argc, char **argv )
 
                        for ( i = 0; !BER_BVISNULL( &option_helpers[i].oh_name ); i++ ) {
                                if ( ber_bvstrcasecmp( &option_helpers[i].oh_name, &opt ) == 0 ) {
-                                       if ( option_helpers[i].oh_fnc( val, option_helpers[i].oh_arg ) == -1 ) {
-                                               goto destroy;
+                                       assert( option_helpers[i].oh_fnc != NULL );
+                                       if ( (*option_helpers[i].oh_fnc)( val, option_helpers[i].oh_arg ) == -1 ) {
+                                               /* we assume the option parsing helper
+                                                * issues appropriate and self-explanatory
+                                                * error messages... */
+                                               goto stop;
                                        }
+                                       break;
                                }
                        }