mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
Clean up error messages
This commit is contained in:
parent
0c5d1dc00f
commit
ca84693b12
@ -200,16 +200,16 @@ main( int argc, char **argv )
|
||||
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
fprintf( stderr, "authzid control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
fprintf( stderr, "authzid: control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
fprintf( stderr, "authzid: must be marked critical\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -220,11 +220,11 @@ main( int argc, char **argv )
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
fprintf( stderr, "manageDSAit control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "manageDSAit: no control value expected" );
|
||||
fprintf( stderr, "manageDSAit: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -234,11 +234,11 @@ main( int argc, char **argv )
|
||||
|
||||
} else if ( strcasecmp( control, "noop" ) == 0 ) {
|
||||
if( noop ) {
|
||||
fprintf( stderr, "noop control previously specified");
|
||||
fprintf( stderr, "noop control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "noop: no control value expected" );
|
||||
fprintf( stderr, "noop: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -199,16 +199,16 @@ main( int argc, char **argv )
|
||||
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
fprintf( stderr, "authzid control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
fprintf( stderr, "authzid: control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
fprintf( stderr, "authzid: must be marked critical\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -219,11 +219,11 @@ main( int argc, char **argv )
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
fprintf( stderr, "manageDSAit control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "manageDSAit: no control value expected" );
|
||||
fprintf( stderr, "manageDSAit: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -233,11 +233,11 @@ main( int argc, char **argv )
|
||||
|
||||
} else if ( strcasecmp( control, "noop" ) == 0 ) {
|
||||
if( noop ) {
|
||||
fprintf( stderr, "noop control previously specified");
|
||||
fprintf( stderr, "noop control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "noop: no control value expected" );
|
||||
fprintf( stderr, "noop: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -263,16 +263,16 @@ main( int argc, char **argv )
|
||||
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
fprintf( stderr, "authzid control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
fprintf( stderr, "authzid: control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
fprintf( stderr, "authzid: must be marked critical\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -283,11 +283,11 @@ main( int argc, char **argv )
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
fprintf( stderr, "manageDSAit control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "manageDSAit: no control value expected" );
|
||||
fprintf( stderr, "manageDSAit: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -297,11 +297,11 @@ main( int argc, char **argv )
|
||||
|
||||
} else if ( strcasecmp( control, "noop" ) == 0 ) {
|
||||
if( noop ) {
|
||||
fprintf( stderr, "noop control previously specified");
|
||||
fprintf( stderr, "noop control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "noop: no control value expected" );
|
||||
fprintf( stderr, "noop: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -219,16 +219,16 @@ main(int argc, char **argv)
|
||||
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
fprintf( stderr, "authzid control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
fprintf( stderr, "authzid: control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
fprintf( stderr, "authzid: must be marked critical\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -239,11 +239,11 @@ main(int argc, char **argv)
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
fprintf( stderr, "manageDSAit control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "manageDSAit: no control value expected" );
|
||||
fprintf( stderr, "manageDSAit: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -253,11 +253,11 @@ main(int argc, char **argv)
|
||||
|
||||
} else if ( strcasecmp( control, "noop" ) == 0 ) {
|
||||
if( noop ) {
|
||||
fprintf( stderr, "noop control previously specified");
|
||||
fprintf( stderr, "noop control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "noop: no control value expected" );
|
||||
fprintf( stderr, "noop: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -219,16 +219,16 @@ main( int argc, char *argv[] )
|
||||
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
fprintf( stderr, "authzid control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
fprintf( stderr, "authzid: control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
fprintf( stderr, "authzid: must be marked critical\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -239,11 +239,11 @@ main( int argc, char *argv[] )
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
fprintf( stderr, "manageDSAit control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "manageDSAit: no control value expected" );
|
||||
fprintf( stderr, "manageDSAit: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -253,7 +253,7 @@ main( int argc, char *argv[] )
|
||||
|
||||
} else if ( strcasecmp( control, "noop" ) == 0 ) {
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "noop: no control value expected" );
|
||||
fprintf( stderr, "noop: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ main( int argc, char **argv )
|
||||
if ( strcasecmp( control, "mv" ) == 0 ) {
|
||||
/* ValuesReturnFilter control */
|
||||
if( valuesReturnFilter ) {
|
||||
fprintf( stderr, "ValuesReturnFilter previously specified");
|
||||
fprintf( stderr, "ValuesReturnFilter previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
valuesReturnFilter= 1 + crit;
|
||||
@ -329,7 +329,7 @@ main( int argc, char **argv )
|
||||
int num, tmp;
|
||||
/* PagedResults control */
|
||||
if ( pagedResults != 0 ) {
|
||||
fprintf( stderr, "PagedResultsControl previously specified" );
|
||||
fprintf( stderr, "PagedResultsControl previously specified\n" );
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ main( int argc, char **argv )
|
||||
#ifdef LDAP_CONTROL_SUBENTRIES
|
||||
} else if ( strcasecmp( control, "subentries" ) == 0 ) {
|
||||
if( subentries ) {
|
||||
fprintf( stderr, "subentries control previously specified");
|
||||
fprintf( stderr, "subentries control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL || strcasecmp( cvalue, "true") == 0 ) {
|
||||
|
@ -175,16 +175,16 @@ main( int argc, char *argv[] )
|
||||
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
fprintf( stderr, "authzid control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
fprintf( stderr, "authzid: control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
fprintf( stderr, "authzid: must be marked critical\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -195,11 +195,11 @@ main( int argc, char *argv[] )
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
fprintf( stderr, "manageDSAit control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "manageDSAit: no control value expected" );
|
||||
fprintf( stderr, "manageDSAit: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -209,11 +209,11 @@ main( int argc, char *argv[] )
|
||||
|
||||
} else if ( strcasecmp( control, "noop" ) == 0 ) {
|
||||
if( noop ) {
|
||||
fprintf( stderr, "noop control previously specified");
|
||||
fprintf( stderr, "noop control previously specified\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue != NULL ) {
|
||||
fprintf( stderr, "noop: no control value expected" );
|
||||
fprintf( stderr, "noop: no control value expected\n" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user