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 1f23695c..eee9b2cd 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 @@ -113,7 +113,7 @@ namespace Novell.Casa.Client.Auth SSCS_EXT_T ext = new SSCS_EXT_T(); - if ((luid.GetHighPart() != 0) || (luid.GetLowPart() != 0)) + if ((luid != null) && (luid.GetHighPart() != 0) || (luid.GetLowPart() != 0)) { // allocate a structure to marshal LUID sluid = new LUID(); @@ -146,7 +146,14 @@ namespace Novell.Casa.Client.Auth { // now allocate the proper size baToken = new byte[bufferSize]; - rcode = ObtainAuthToken(baService, baHost, baToken, ref bufferSize); + if (bLuidPassedIn) + { + rcode = ObtainAuthTokenEx(baService, baHost, baToken, ref bufferSize, ext); + } + else + { + rcode = ObtainAuthToken(baService, baHost, baToken, ref bufferSize); + } } } catch (Exception e)