personally, I'm much more comfortable using hex for log levels...

This commit is contained in:
Pierangelo Masarati 2005-08-13 16:04:40 +00:00
parent 5631f25839
commit f6ef5170fa

View File

@ -404,7 +404,17 @@ int main( int argc, char **argv )
slap_debug |= level;
} else {
slap_debug |= atoi( optarg );
int level;
char *next = NULL;
level = strtol( optarg, &next, 0 );
if ( next == NULL || next[ 0 ] != '\0' ) {
fprintf( stderr,
"unrecognized log level "
"\"%s\"\n", optarg );
goto destroy;
}
slap_debug |= level;
}
#else
if ( atoi( optarg ) != 0 )