From 42e3203ab57958eb95eea56ba3fb3c3c21e86d33 Mon Sep 17 00:00:00 2001 From: Juan Carlos Luciani Date: Tue, 5 Dec 2006 11:23:09 +0000 Subject: [PATCH] Fixed problem that was causing the library to crash when ObtainAuthToken was called with a null WinLUID. --- .../client/csharp-api/Novell.Casa.Authtoken/Authtoken.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CASA-auth-token/client/csharp-api/Novell.Casa.Authtoken/Authtoken.cs b/CASA-auth-token/client/csharp-api/Novell.Casa.Authtoken/Authtoken.cs index a4fe70f5..4f75ab69 100644 --- a/CASA-auth-token/client/csharp-api/Novell.Casa.Authtoken/Authtoken.cs +++ b/CASA-auth-token/client/csharp-api/Novell.Casa.Authtoken/Authtoken.cs @@ -127,7 +127,8 @@ namespace Novell.Casa.Client.Auth SSCS_EXT_T ext = new SSCS_EXT_T(); LUID sluid; - if ((luid != null) && (luid.GetHighPart() != 0) || (luid.GetLowPart() != 0)) + if ((luid != null) && + ((luid.GetHighPart() != 0) || (luid.GetLowPart() != 0))) { // allocate a structure to marshal sluid = new LUID(); @@ -155,8 +156,7 @@ namespace Novell.Casa.Client.Auth rcode = ObtainAuthToken(baService, baHost, baToken, ref bufferSize); } - int test = (rcode & BUFFER_OVERFLOW); - if (test == BUFFER_OVERFLOW) + if ((rcode & 0xFFFF) == BUFFER_OVERFLOW) { // now allocate the proper size baToken = new byte[bufferSize];