]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/args.c
Added support for newSuperior.
[openldap] / servers / slurpd / args.c
index c3b202065c67ed09a08fb16a134a301ff030665f..57b80c111cfdf93959f9f02a2ac2e129167ec6ad 100644 (file)
@@ -65,8 +65,8 @@ doargs(
 
     while ( (i = getopt( argc, argv, "hd:f:r:t:k:o" )) != EOF ) {
        switch ( i ) {
-#ifdef LDAP_DEBUG
        case 'd':       /* turn on debugging */
+#ifdef LDAP_DEBUG
            if ( optarg[0] == '?' ) {
                printf( "Debug levels:\n" );
                printf( "\tLDAP_DEBUG_TRACE\t%d\n",
@@ -89,14 +89,13 @@ doargs(
                        LDAP_DEBUG_ANY );
                return( -1 );
            } else {
-               ldap_debug = atoi( optarg );
+               ldap_debug |= atoi( optarg );
            }
-           break;
 #else /* LDAP_DEBUG */
-       case 'd':       /* can't enable debugging - not built with debug code */
+               /* can't enable debugging - not built with debug code */
            fprintf( stderr, "must compile with LDAP_DEBUG for debugging\n" );
-           break;
 #endif /* LDAP_DEBUG */
+           break;
        case 'f':       /* slapd config file */
            g->slapd_configfile = strdup( optarg );
            break;
@@ -140,6 +139,10 @@ doargs(
     sprintf( g->slurpd_status_file, "%s/%s", g->slurpd_rdir,
            DEFAULT_SLURPD_STATUS_FILE );
 
+       lber_set_option(NULL, LBER_OPT_DEBUG_LEVEL, &ldap_debug);
+       ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &ldap_debug);
+       ldif_debug = ldap_debug;
+
 #ifdef LOG_LOCAL4
     openlog( g->myname, OPENLOG_OPTIONS, LOG_LOCAL4 );
 #else