]> git.sur5r.net Git - openldap/commitdiff
cleanup
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 4 Jan 2011 21:59:33 +0000 (21:59 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 4 Jan 2011 21:59:33 +0000 (21:59 +0000)
clients/tools/common.c

index 0a503818e2b6b640e5ec5bd1f0afd7bbd0509c05..7606f99a9eed181f9d1be0d27c76cb4bdd8e349a 100644 (file)
@@ -599,6 +599,19 @@ tool_args( int argc, char **argv )
                                }
 #endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
 
+#ifdef LDAP_CONTROL_X_SESSION_TRACKING
+                       } else if ( strcasecmp( control, "sessiontracking" ) == 0 ) {
+                               if ( sessionTracking ) {
+                                       fprintf( stderr, "%s: session tracking can be only specified once\n", prog );
+                                       exit( EXIT_FAILURE );
+                               }
+                               sessionTracking = 1;
+                               if( crit ) {
+                                       fprintf( stderr, "sessiontracking: critical flag not allowed\n" );
+                                       usage();
+                               }
+#endif /* LDAP_CONTROL_X_SESSION_TRACKING */
+
                        /* this shouldn't go here, really; but it's a feature... */
                        } else if ( strcasecmp( control, "abandon" ) == 0 ) {
                                abcan = Intr_Abandon;
@@ -618,15 +631,6 @@ tool_args( int argc, char **argv )
                                        gotintr = abcan;
                                }
 
-#ifdef LDAP_CONTROL_X_SESSION_TRACKING
-                       } else if ( strcasecmp( control, "sessiontracking" ) == 0 ) {
-                               if ( sessionTracking ) {
-                                       fprintf( stderr, "%s: session tracking can be only specified once\n", prog );
-                                       exit( EXIT_FAILURE );
-                               }
-                               sessionTracking = 1;
-#endif /* LDAP_CONTROL_X_SESSION_TRACKING */
-
                        } else if ( tool_is_oid( control ) ) {
                                LDAPControl     *tmpctrls, ctrl;