Skip to content

Commit ddc196a

Browse files
author
Lee Cavazos
committed
Taking out a Few Lines of Code
1 parent 8e1bdc8 commit ddc196a

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

Zephyr.Directory.Ldap/LdapServer.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,6 @@ public LdapResponse Search(LdapRequest request, string searchBase, string search
250250
parsed_string = nextTokenStr.Split("-");
251251
nextToken = Utils.Base64ToBytes(parsed_string[0]);
252252
Pick_up_Here = Int32.Parse(parsed_string[1]);
253-
if(Pick_up_Here == 0){
254-
Pick_up_Here = 1;
255-
}
256253
}
257254

258255
}
@@ -457,6 +454,7 @@ public LdapResponse Search(LdapRequest request, string searchBase, string search
457454
}
458455
}
459456
else{
457+
// Logic to help determine the next Client Based Token
460458
if(Token_present)
461459
continue_token = $"-0{iteration}";
462460
else{
@@ -563,12 +561,8 @@ public LdapResponse Search(LdapRequest request, string searchBase, string search
563561
if (nextToken != null && nextToken.Length > 0)
564562
if (iteration >= 1 && string.IsNullOrEmpty(PossibleNextToken))
565563
response.NextToken = String.Concat(Utils.BytesToBase64(nextToken), String.Concat("-", iteration.ToString()));
566-
else{
567-
if(TokenType == "Client")
568-
response.NextToken = Utils.BytesToBase64(nextToken);
569-
else
570-
response.NextToken = String.Concat(Utils.BytesToBase64(nextToken), String.Concat("-", iteration.ToString()));
571-
}
564+
else
565+
response.NextToken = Utils.BytesToBase64(nextToken);
572566
}
573567
catch (Exception e)
574568
{

0 commit comments

Comments
 (0)