Fix launch GUI error for IsSecretPersistent

This commit is contained in:
Jim Norman 2005-11-07 18:48:48 +00:00
parent 4dae137bc4
commit 878c526930

View File

@ -1244,31 +1244,33 @@ namespace Novell.CASA
public static bool IsSecretPersistent(uint ssFlags, string id) public static bool IsSecretPersistent(uint ssFlags, string id)
{ {
int rcode = 0; int rcode = 0;
if (null != id && "" !=id)
SSCS_SECRET_ID_T secretID = new SSCS_SECRET_ID_T();
try
{ {
SSCS_SECRET_ID_T secretID = new SSCS_SECRET_ID_T(); if(ssFlags == 0)
try
{ {
if(ssFlags == 0) if ((null == id) || ("" == id))
{ return false;
secretID.len = id.Length;
secretID.id = id; secretID.len = id.Length;
rcode = miCASAIsSecretPersistent(ssFlags, secretID.id = id;
secretID, rcode = miCASAIsSecretPersistent(ssFlags,
new SSCS_EXT_T()); secretID,
} new SSCS_EXT_T());
else
{
rcode = miCASAIsSecretPersistent(ssFlags,
null,
new SSCS_EXT_T());
}
} }
catch (Exception e) else
{ {
Console.WriteLine(e.ToString()); rcode = miCASAIsSecretPersistent(ssFlags,
null,
new SSCS_EXT_T());
} }
} }
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
if(rcode == 1) if(rcode == 1)
return true; return true;