Fixed all of the compiler warnings for the client components.

This commit is contained in:
Juan Carlos Luciani 2006-10-06 20:13:14 +00:00
parent 06369edbd9
commit 665c251e3b
12 changed files with 100 additions and 109 deletions

View File

@ -265,7 +265,7 @@ GetAuthMechToken(
CasaStatus retStatus = CasaStatusBuild(CASA_SEVERITY_ERROR, CasaStatus retStatus = CasaStatusBuild(CASA_SEVERITY_ERROR,
CASA_FACILITY_AUTHTOKEN, CASA_FACILITY_AUTHTOKEN,
CASA_STATUS_UNSUCCESSFUL); CASA_STATUS_UNSUCCESSFUL);
AuthTokenIf *pAuthTokenIf; AuthTokenIf *pAuthTokenIf = NULL;
DbgTrace(1, "-GetAuthMechToken- Start\n", 0); DbgTrace(1, "-GetAuthMechToken- Start\n", 0);

View File

@ -177,7 +177,7 @@ BuildAuthenticateMsg(
DbgTrace(0, "-BuildAuthenticateMsg- Buffer allocation error\n", 0); DbgTrace(0, "-BuildAuthenticateMsg- Buffer allocation error\n", 0);
} }
DbgTrace(1, "-BuildAuthenticateMsg- End, pMsg = %08X\n", pMsg); DbgTrace(1, "-BuildAuthenticateMsg- End, pMsg = %0lX\n", (long) pMsg);
return pMsg; return pMsg;
} }
@ -689,11 +689,11 @@ CreateAuthenticateResp(
// Set the start and end element handlers // Set the start and end element handlers
XML_SetElementHandler(p, XML_SetElementHandler(p,
AuthRespStartElementHandler, (XML_StartElementHandler) AuthRespStartElementHandler,
AuthRespEndElementHandler); (XML_EndElementHandler) AuthRespEndElementHandler);
// Set the character data handler // Set the character data handler
XML_SetCharacterDataHandler(p, AuthRespCharDataHandler); XML_SetCharacterDataHandler(p, (XML_CharacterDataHandler) AuthRespCharDataHandler);
// Set our user data // Set our user data

View File

@ -626,7 +626,7 @@ CreateAuthPolicy(
// Decode the data // Decode the data
retStatus = DecodeData(pEncodedData, retStatus = DecodeData(pEncodedData,
encodedDataLen, encodedDataLen,
&pData, (void**) &pData,
&dataLen); &dataLen);
if (CASA_SUCCESS(retStatus)) if (CASA_SUCCESS(retStatus))
{ {
@ -655,11 +655,11 @@ CreateAuthPolicy(
// Set the start and end element handlers // Set the start and end element handlers
XML_SetElementHandler(p, XML_SetElementHandler(p,
AuthPolicyStartElementHandler, (XML_StartElementHandler) AuthPolicyStartElementHandler,
AuthPolicyEndElementHandler); (XML_EndElementHandler) AuthPolicyEndElementHandler);
// Set the character data handler // Set the character data handler
XML_SetCharacterDataHandler(p, AuthPolicyCharDataHandler); XML_SetCharacterDataHandler(p, (XML_CharacterDataHandler) AuthPolicyCharDataHandler);
// Set our user data // Set our user data
XML_SetUserData(p, &authPolicyParse); XML_SetUserData(p, &authPolicyParse);

View File

@ -34,22 +34,16 @@
//===[ Global variables ]================================================== //===[ Global variables ]==================================================
// Non-host specific key name
static
char g_allHosts[] = "AllHosts";
static
int g_cacheEntryCount = 0;
HANDLE g_hCASAContext; HANDLE g_hCASAContext;
//++======================================================================= //++=======================================================================
AuthCacheEntry* AuthCacheEntry*
CreateAuthTokenCacheEntry( CreateAuthTokenCacheEntry(
IN const char *pCacheKey, IN const char *pCacheKey,
IN const char *pGroupOrHostName, IN const char *pGroupOrHostName,
IN CasaStatus status, IN CasaStatus status,
IN unsigned char *pToken, IN char *pToken,
IN int entryLifetime // seconds (0 == Lives forever) IN int entryLifetime // seconds (0 == Lives forever)
) )
// //
@ -67,16 +61,16 @@ CreateAuthTokenCacheEntry(
CasaStatus retStatus; CasaStatus retStatus;
SSCS_KEYCHAIN_ID_T sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"}; SSCS_KEYCHAIN_ID_T sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"};
SSCS_SECRET_ID_T sharedId = {27, "CASA_AUTHENTICATION_TOKENS"}; SSCS_SECRET_ID_T sharedId = {27, "CASA_AUTHENTICATION_TOKENS"};
uint32_t tokenSize, entrySize, keySize; int32_t tokenSize, entrySize, keySize;
AuthCacheEntry *pEntry = NULL; AuthCacheEntry *pEntry = NULL;
unsigned char *pKey; char *pKey;
DbgTrace(1, "-CreateAuthTokenCacheEntry- Start\n", 0); DbgTrace(1, "-CreateAuthTokenCacheEntry- Start\n", 0);
if (status == CASA_STATUS_SUCCESS) if (status == CASA_STATUS_SUCCESS)
{ {
tokenSize = (uint32_t)strlen(pToken); tokenSize = (uint32_t) strlen(pToken);
} }
else else
{ {
@ -130,12 +124,12 @@ CreateAuthTokenCacheEntry(
0, 0,
&sessionKeyChain, &sessionKeyChain,
&sharedId, &sharedId,
pKey, (SS_UTF8_T*) pKey,
keySize, keySize,
(uint8_t *)pEntry, (uint8_t *) pEntry,
&entrySize, (uint32_t*) &entrySize,
NULL, NULL,
NULL); (SSCS_EXT_T*) NULL);
free(pKey); free(pKey);
@ -154,7 +148,7 @@ CreateAuthTokenCacheEntry(
CASA_STATUS_INSUFFICIENT_RESOURCES); CASA_STATUS_INSUFFICIENT_RESOURCES);
} }
DbgTrace(1, "-CreateAuthTokenCacheEntry- End, pEntry = %08X\n", pEntry); DbgTrace(1, "-CreateAuthTokenCacheEntry- End, pEntry = %0lX\n", (long) pEntry);
return pEntry; return pEntry;
} }
@ -165,7 +159,7 @@ AuthCacheEntry*
CreateSessionTokenCacheEntry( CreateSessionTokenCacheEntry(
IN const char *pCacheKey, IN const char *pCacheKey,
IN CasaStatus status, IN CasaStatus status,
IN unsigned char *pToken, IN char *pToken,
IN int entryLifetime // seconds (0 == Lives forever) IN int entryLifetime // seconds (0 == Lives forever)
) )
// //
@ -183,7 +177,7 @@ CreateSessionTokenCacheEntry(
CasaStatus retStatus; CasaStatus retStatus;
SSCS_KEYCHAIN_ID_T sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"}; SSCS_KEYCHAIN_ID_T sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"};
SSCS_SECRET_ID_T sharedId = {20, "CASA_SESSION_TOKENS"}; SSCS_SECRET_ID_T sharedId = {20, "CASA_SESSION_TOKENS"};
uint32_t tokenSize, entrySize; int32_t tokenSize, entrySize;
AuthCacheEntry *pEntry = NULL; AuthCacheEntry *pEntry = NULL;
@ -235,12 +229,12 @@ CreateSessionTokenCacheEntry(
0, 0,
&sessionKeyChain, &sessionKeyChain,
&sharedId, &sharedId,
(char *)pCacheKey, (SS_UTF8_T*) pCacheKey,
(uint32_t)strlen(pCacheKey) + 1, (uint32_t) strlen(pCacheKey) + 1,
(uint8_t *)pEntry, (uint8_t *) pEntry,
&entrySize, (uint32_t*) &entrySize,
NULL, NULL,
NULL); (SSCS_EXT_T*) NULL);
} }
else else
{ {
@ -249,7 +243,7 @@ CreateSessionTokenCacheEntry(
CASA_STATUS_INSUFFICIENT_RESOURCES); CASA_STATUS_INSUFFICIENT_RESOURCES);
} }
DbgTrace(1, "-CreateSessionTokenCacheEntry- End, pEntry = %08X\n", pEntry); DbgTrace(1, "-CreateSessionTokenCacheEntry- End, pEntry = %0lX\n", (long) pEntry);
return pEntry; return pEntry;
} }
@ -272,7 +266,7 @@ FreeAuthCacheEntry(
// L2 // L2
//=======================================================================-- //=======================================================================--
{ {
DbgTrace(1, "-FreeAuthCacheEntry- Start, pEntry = %08X\n", pEntry); DbgTrace(1, "-FreeAuthCacheEntry- Start, pEntry = %0lX\n", (long) pEntry);
// Free the entry // Free the entry
free(pEntry); free(pEntry);
@ -370,7 +364,7 @@ FindSessionTokenEntryInCache(
CasaStatus retStatus; CasaStatus retStatus;
SSCS_KEYCHAIN_ID_T sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"}; SSCS_KEYCHAIN_ID_T sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"};
SSCS_SECRET_ID_T sharedId = {20, "CASA_SESSION_TOKENS"}; SSCS_SECRET_ID_T sharedId = {20, "CASA_SESSION_TOKENS"};
uint32_t valueLength, bytesRequired; int32_t valueLength, bytesRequired;
AuthCacheEntry *pEntry = NULL; AuthCacheEntry *pEntry = NULL;
@ -383,13 +377,13 @@ FindSessionTokenEntryInCache(
0, 0,
&sessionKeyChain, &sessionKeyChain,
&sharedId, &sharedId,
(char *)pCacheKey, (SS_UTF8_T*) pCacheKey,
(uint32_t)strlen(pCacheKey) + 1, (uint32_t) strlen(pCacheKey) + 1,
NULL, NULL,
&valueLength, (uint32_t*) &valueLength,
NULL, (SSCS_PASSWORD_T*) NULL,
&bytesRequired, (uint32_t*) &bytesRequired,
NULL); (SSCS_EXT_T*) NULL);
if (retStatus == NSSCS_E_ENUM_BUFF_TOO_SHORT if (retStatus == NSSCS_E_ENUM_BUFF_TOO_SHORT
&& bytesRequired != 0) && bytesRequired != 0)
@ -405,13 +399,13 @@ FindSessionTokenEntryInCache(
0, 0,
&sessionKeyChain, &sessionKeyChain,
&sharedId, &sharedId,
(char *)pCacheKey, (SS_UTF8_T*) pCacheKey,
(uint32_t)strlen(pCacheKey) + 1, (uint32_t) strlen(pCacheKey) + 1,
(uint8_t *)pEntry, (uint8_t *) pEntry,
&valueLength, (uint32_t*) &valueLength,
NULL, (SSCS_PASSWORD_T*) NULL,
&bytesRequired, (uint32_t*) &bytesRequired,
NULL); (SSCS_EXT_T*) NULL);
if (CASA_SUCCESS(retStatus)) if (CASA_SUCCESS(retStatus))
{ {
if (pEntry->doesNotExpire == false if (pEntry->doesNotExpire == false
@ -434,7 +428,7 @@ FindSessionTokenEntryInCache(
} }
} }
DbgTrace(1, "-FindSessionTokenEntryInCache- End, pEntry = %08X\n", pEntry); DbgTrace(1, "-FindSessionTokenEntryInCache- End, pEntry = %0lX\n", (long) pEntry);
return pEntry; return pEntry;
} }
@ -460,9 +454,9 @@ FindAuthTokenEntryInCache(
CasaStatus retStatus; CasaStatus retStatus;
SSCS_KEYCHAIN_ID_T sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"}; SSCS_KEYCHAIN_ID_T sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"};
SSCS_SECRET_ID_T sharedId = {27, "CASA_AUTHENTICATION_TOKENS"}; SSCS_SECRET_ID_T sharedId = {27, "CASA_AUTHENTICATION_TOKENS"};
uint32_t valueLength, bytesRequired, keySize; int32_t valueLength, bytesRequired, keySize;
AuthCacheEntry *pEntry = NULL; AuthCacheEntry *pEntry = NULL;
unsigned char *pKey; char *pKey;
DbgTrace(1, "-FindAuthTokenEntryInCache- Start\n", 0); DbgTrace(1, "-FindAuthTokenEntryInCache- Start\n", 0);
@ -483,13 +477,13 @@ FindAuthTokenEntryInCache(
0, 0,
&sessionKeyChain, &sessionKeyChain,
&sharedId, &sharedId,
pKey, (SS_UTF8_T*) pKey,
keySize, keySize,
NULL, NULL,
&valueLength, (uint32_t*) &valueLength,
NULL, (SSCS_PASSWORD_T*) NULL,
&bytesRequired, (uint32_t*) &bytesRequired,
NULL); (SSCS_EXT_T*) NULL);
if (retStatus == NSSCS_E_ENUM_BUFF_TOO_SHORT if (retStatus == NSSCS_E_ENUM_BUFF_TOO_SHORT
&& bytesRequired != 0) && bytesRequired != 0)
@ -505,13 +499,13 @@ FindAuthTokenEntryInCache(
0, 0,
&sessionKeyChain, &sessionKeyChain,
&sharedId, &sharedId,
pKey, (SS_UTF8_T*) pKey,
keySize, keySize,
(uint8_t *)pEntry, (uint8_t *) pEntry,
&valueLength, (uint32_t*) &valueLength,
NULL, (SSCS_PASSWORD_T*) NULL,
&bytesRequired, (uint32_t*) &bytesRequired,
NULL); (SSCS_EXT_T*) NULL);
if (CASA_SUCCESS(retStatus)) if (CASA_SUCCESS(retStatus))
{ {
if (pEntry->doesNotExpire == false if (pEntry->doesNotExpire == false
@ -537,7 +531,7 @@ FindAuthTokenEntryInCache(
free(pKey); free(pKey);
} }
DbgTrace(1, "-FindAuthTokenEntryInCache- End, pEntry = %08X\n", pEntry); DbgTrace(1, "-FindAuthTokenEntryInCache- End, pEntry = %0lX\n", (long) pEntry);
return pEntry; return pEntry;
} }

View File

@ -478,7 +478,7 @@ ObtainAuthToken(
CasaStatus retStatus = CASA_STATUS_SUCCESS; CasaStatus retStatus = CASA_STATUS_SUCCESS;
AuthCacheEntry *pCacheEntry; AuthCacheEntry *pCacheEntry;
char *pNormalizedHostName; char *pNormalizedHostName;
unsigned char *pToken; char *pToken;
HANDLE hUserMutex = NULL; HANDLE hUserMutex = NULL;
DbgTrace(1, "-ObtainAuthToken- Start\n", 0); DbgTrace(1, "-ObtainAuthToken- Start\n", 0);

View File

@ -70,8 +70,8 @@ typedef struct _GetAuthPolicyRespParse
//++======================================================================= //++=======================================================================
char* char*
BuildGetAuthPolicyMsg( BuildGetAuthPolicyMsg(
IN char *pServiceName, IN const char *pServiceName,
IN char *pHostName) IN const char *pHostName)
// //
// Arguments: // Arguments:
// //
@ -158,7 +158,7 @@ BuildGetAuthPolicyMsg(
DbgTrace(0, "-BuildGetAuthPolicyMsg- Buffer allocation error\n", 0); DbgTrace(0, "-BuildGetAuthPolicyMsg- Buffer allocation error\n", 0);
} }
DbgTrace(1, "-BuildGetAuthPolicyMsg- End, pMsg = %08X\n", pMsg); DbgTrace(1, "-BuildGetAuthPolicyMsg- End, pMsg = %0lX\n", (long) pMsg);
return pMsg; return pMsg;
} }
@ -630,11 +630,11 @@ CreateGetAuthPolicyResp(
// Set the start and end element handlers // Set the start and end element handlers
XML_SetElementHandler(p, XML_SetElementHandler(p,
GetAuthPolicyRespStartElementHandler, (XML_StartElementHandler) GetAuthPolicyRespStartElementHandler,
GetAuthPolicyRespEndElementHandler); (XML_EndElementHandler) GetAuthPolicyRespEndElementHandler);
// Set the character data handler // Set the character data handler
XML_SetCharacterDataHandler(p, GetAuthPolicyRespCharDataHandler); XML_SetCharacterDataHandler(p, (XML_CharacterDataHandler) GetAuthPolicyRespCharDataHandler);
// Set our user data // Set our user data

View File

@ -69,8 +69,8 @@ typedef struct _GetAuthTokenRespParse
//++======================================================================= //++=======================================================================
char* char*
BuildGetAuthTokenMsg( BuildGetAuthTokenMsg(
IN char *pServiceName, IN const char *pServiceName,
IN char *pHostName, IN const char *pHostName,
IN char *pSessionToken) IN char *pSessionToken)
// //
// Arguments: // Arguments:
@ -174,7 +174,7 @@ BuildGetAuthTokenMsg(
DbgTrace(0, "-BuildGetAuthTokenMsg- Buffer allocation error\n", 0); DbgTrace(0, "-BuildGetAuthTokenMsg- Buffer allocation error\n", 0);
} }
DbgTrace(1, "-BuildGetAuthTokenMsg- End, pMsg = %08X\n", pMsg); DbgTrace(1, "-BuildGetAuthTokenMsg- End, pMsg = %0lX\n", (long) pMsg);
return pMsg; return pMsg;
} }
@ -680,11 +680,11 @@ CreateGetAuthTokenResp(
// Set the start and end element handlers // Set the start and end element handlers
XML_SetElementHandler(p, XML_SetElementHandler(p,
GetAuthTokenRespStartElementHandler, (XML_StartElementHandler) GetAuthTokenRespStartElementHandler,
GetAuthTokenRespEndElementHandler); (XML_EndElementHandler) GetAuthTokenRespEndElementHandler);
// Set the character data handler // Set the character data handler
XML_SetCharacterDataHandler(p, GetAuthTokenRespCharDataHandler); XML_SetCharacterDataHandler(p, (XML_CharacterDataHandler) GetAuthTokenRespCharDataHandler);
// Set our user data // Set our user data

View File

@ -149,8 +149,8 @@ GetAuthMechToken(
extern extern
char* char*
BuildGetAuthPolicyMsg( BuildGetAuthPolicyMsg(
IN char *pServiceName, IN const char *pServiceName,
IN char *pHostName); IN const char *pHostName);
extern extern
CasaStatus CasaStatus
@ -209,8 +209,8 @@ RelAuthenticateResp(
extern extern
char* char*
BuildGetAuthTokenMsg( BuildGetAuthTokenMsg(
IN char *pServiceName, IN const char *pServiceName,
IN char *pHostName, IN const char *pHostName,
IN char *pSessionToken); IN char *pSessionToken);
extern extern
@ -234,7 +234,7 @@ AuthCacheEntry*
CreateSessionTokenCacheEntry( CreateSessionTokenCacheEntry(
IN const char *pCacheKey, IN const char *pCacheKey,
IN CasaStatus status, IN CasaStatus status,
IN unsigned char *pToken, IN char *pToken,
IN int entryLifetime); IN int entryLifetime);
extern extern
@ -243,7 +243,7 @@ CreateAuthTokenCacheEntry(
IN const char *pCacheKey, IN const char *pCacheKey,
IN const char *pHostName, IN const char *pHostName,
IN CasaStatus status, IN CasaStatus status,
IN unsigned char *pToken, IN char *pToken,
IN int entryLifetime); IN int entryLifetime);
extern extern
@ -337,8 +337,8 @@ InitializeHostNameNormalization(void);
extern extern
RpcSession* RpcSession*
OpenRpcSession( OpenRpcSession(
IN char *pHostName, IN const char *pHostName,
IN uint16_t hostPort); IN const uint16_t hostPort);
extern extern
void void

View File

@ -353,14 +353,14 @@ GetTickCount(void)
long ticksPerSecond; long ticksPerSecond;
ticksPerSecond = sysconf(_SC_CLK_TCK); ticksPerSecond = sysconf(_SC_CLK_TCK);
DbgTrace(3, "-GetTickCount- TicksPerSec = %0X\n", ticksPerSecond); DbgTrace(3, "-GetTickCount- TicksPerSec = %0lX\n", ticksPerSecond);
g_milliSecondsPerTicks = 1000 / ticksPerSecond; g_milliSecondsPerTicks = 1000 / ticksPerSecond;
} }
// Determine the tickCount as milliseconds // Determine the tickCount as milliseconds
tickCount = g_milliSecondsPerTicks * times(&tm); tickCount = g_milliSecondsPerTicks * times(&tm);
DbgTrace(2, "-GetTickCount- End, retValue = %0X\n", tickCount); DbgTrace(2, "-GetTickCount- End, retValue = %0lX\n", tickCount);
return tickCount; return tickCount;
} }
@ -410,8 +410,6 @@ CreateUserMutex(
DbgTrace(0, "-CreateUserMutex- sprintf failed, error = %d\n", errno); DbgTrace(0, "-CreateUserMutex- sprintf failed, error = %d\n", errno);
} }
exit:
DbgTrace(1, "-CreateUserMutex- End, retStatus\n", retStatus); DbgTrace(1, "-CreateUserMutex- End, retStatus\n", retStatus);
return retStatus; return retStatus;
@ -545,10 +543,10 @@ OpenLibrary(
libHandle = dlopen(pFileName, RTLD_LAZY); libHandle = dlopen(pFileName, RTLD_LAZY);
if (libHandle == NULL) if (libHandle == NULL)
{ {
DbgTrace(0, "-OpenLibrary- Not able to load library, error = %d\n", dlerror()); DbgTrace(0, "-OpenLibrary- Not able to load library, error = %s\n", dlerror());
} }
DbgTrace(1, "-OpenLibrary- End, handle = %08X\n", libHandle); DbgTrace(1, "-OpenLibrary- End, handle = %0lX\n", (long) libHandle);
return libHandle; return libHandle;
} }
@ -602,10 +600,10 @@ GetFunctionPtr(
pFuncPtr = dlsym(libHandle, pFunctionName); pFuncPtr = dlsym(libHandle, pFunctionName);
if (pFuncPtr == NULL) if (pFuncPtr == NULL)
{ {
DbgTrace(0, "-GetFunctionPtr- Not able to obtain func ptr, error = %d\n", dlerror()); DbgTrace(0, "-GetFunctionPtr- Not able to obtain func ptr, error = %s\n", dlerror());
} }
DbgTrace(1, "-GetFunctionPtr- End, pFuncPtr = %08X\n", pFuncPtr); DbgTrace(1, "-GetFunctionPtr- End, pFuncPtr = %0lX\n", (long) pFuncPtr);
return pFuncPtr; return pFuncPtr;
} }
@ -793,7 +791,7 @@ NormalizeHostName(
// Release our synchronization mutex // Release our synchronization mutex
pthread_mutex_unlock(&g_hNormalizedHostNameCacheMutex); pthread_mutex_unlock(&g_hNormalizedHostNameCacheMutex);
DbgTrace(1, "-NormalizeHostName- End, pNormalizedName = %08X\n", pNormalizedName); DbgTrace(1, "-NormalizeHostName- End, pNormalizedName = %0lX\n", (long) pNormalizedName);
return pNormalizedName; return pNormalizedName;
} }

View File

@ -113,8 +113,8 @@ CurlWriteCallback(
//++======================================================================= //++=======================================================================
RpcSession* RpcSession*
OpenRpcSession( OpenRpcSession(
IN char *pHostName, IN const char *pHostName,
IN uint16_t hostPort) IN const uint16_t hostPort)
// //
// Arguments: // Arguments:
// //
@ -127,7 +127,7 @@ OpenRpcSession(
// L2 // L2
//=======================================================================-- //=======================================================================--
{ {
RpcSession *pSession; RpcSession *pSession = NULL;
char *pPartialHttpUrl = NULL; char *pPartialHttpUrl = NULL;
char *pPartialHttpsUrl = NULL; char *pPartialHttpsUrl = NULL;
int hostNameLen = strlen(pHostName); int hostNameLen = strlen(pHostName);
@ -244,7 +244,7 @@ OpenRpcSession(
if (pPartialHttpsUrl) if (pPartialHttpsUrl)
free(pPartialHttpsUrl); free(pPartialHttpsUrl);
DbgTrace(2, "-OpenRpcSession- End, pSession = %08X\n", pSession); DbgTrace(2, "-OpenRpcSession- End, pSession = %0lX\n", (long) pSession);
return pSession; return pSession;
} }
@ -374,7 +374,7 @@ InternalRpc(
} }
else else
{ {
DbgTrace(0, "-InternalRpc- HTTP request did not complete successfully, status = %d\n", httpCompStatus); DbgTrace(0, "-InternalRpc- HTTP request did not complete successfully, status = %ld\n", httpCompStatus);
retStatus = CasaStatusBuild(CASA_SEVERITY_ERROR, retStatus = CasaStatusBuild(CASA_SEVERITY_ERROR,
CASA_FACILITY_AUTHTOKEN, CASA_FACILITY_AUTHTOKEN,
CASA_STATUS_UNSUCCESSFUL); CASA_STATUS_UNSUCCESSFUL);

View File

@ -169,7 +169,7 @@ AuthTokenIf_GetAuthToken(
//=======================================================================-- //=======================================================================--
{ {
CasaStatus retStatus; CasaStatus retStatus;
char *pKrbServiceName = pMechInfo; char const *pKrbServiceName = pMechInfo;
OM_uint32 gssMajStat; OM_uint32 gssMajStat;
OM_uint32 gssMinStat; OM_uint32 gssMinStat;
gss_buffer_desc gssBuffer; gss_buffer_desc gssBuffer;

View File

@ -67,10 +67,9 @@ GetUserCredentials(
char *pUsername; char *pUsername;
char *pPassword; char *pPassword;
int rcode = NSSCS_E_OBJECT_NOT_FOUND; int rcode = NSSCS_E_OBJECT_NOT_FOUND;
int32_t credtype = SSCS_CRED_TYPE_BASIC_F; uint32_t credtype = SSCS_CRED_TYPE_BASIC_F;
SSCS_BASIC_CREDENTIAL credential = {0}; SSCS_BASIC_CREDENTIAL credential = {0};
SSCS_SECRET_ID_T secretId = {0}; SSCS_SECRET_ID_T secretId = {0};
SSCS_SECRET_ID_T sharedSecretId = {0};
DbgTrace(1, "-GetUserCredentials- Start\n", 0); DbgTrace(1, "-GetUserCredentials- Start\n", 0);
@ -84,7 +83,7 @@ GetUserCredentials(
if (secretId.len <= NSSCS_MAX_SECRET_ID_LEN) if (secretId.len <= NSSCS_MAX_SECRET_ID_LEN)
{ {
// Set the secret id in the structure // Set the secret id in the structure
sscs_Utf8Strcpy(secretId.id, pRealm); sscs_Utf8Strcpy((char*) secretId.id, pRealm);
// Specify that we want the common name // Specify that we want the common name
credential.unFlags = USERNAME_TYPE_CN_F; credential.unFlags = USERNAME_TYPE_CN_F;
@ -95,19 +94,19 @@ GetUserCredentials(
NULL, NULL,
&credtype, &credtype,
&credential, &credential,
NULL); (SSCS_EXT_T*) NULL);
if (rcode != NSSCS_SUCCESS) if (rcode != NSSCS_SUCCESS)
{ {
// There were no credentials for the realm, now try to obtain the // There were no credentials for the realm, now try to obtain the
// desktop credentials. // desktop credentials.
secretId.len = sscs_Utf8Strlen("Desktop") + 1; secretId.len = sscs_Utf8Strlen("Desktop") + 1;
sscs_Utf8Strcpy(secretId.id, "Desktop"); sscs_Utf8Strcpy((char*) secretId.id, "Desktop");
rcode = miCASAGetCredential(0, rcode = miCASAGetCredential(0,
&secretId, &secretId,
NULL, NULL,
&credtype, &credtype,
&credential, &credential,
NULL); (SSCS_EXT_T*) NULL);
} }
} }
else else
@ -124,18 +123,18 @@ GetUserCredentials(
&& credential.password != NULL) && credential.password != NULL)
{ {
// Allocate a buffer to return the username // Allocate a buffer to return the username
pUsername = (char*) malloc(strlen(credential.username) + 1); pUsername = (char*) malloc(strlen((char*) credential.username) + 1);
if (pUsername) if (pUsername)
{ {
// Copy the username into the buffer that we will be returning // Copy the username into the buffer that we will be returning
strcpy(pUsername, credential.username); strcpy(pUsername, (char*) credential.username);
// Allocate a buffer to return the password // Allocate a buffer to return the password
pPassword = (char*) malloc(strlen(credential.password) + 1); pPassword = (char*) malloc(strlen((char*) credential.password) + 1);
if (pPassword) if (pPassword)
{ {
// Copy the password into the buffer that we will be returning // Copy the password into the buffer that we will be returning
strcpy(pPassword, credential.password); strcpy(pPassword, (char*) credential.password);
DbgTrace(1, "-GetUserCredentials- Username = %s\n", pUsername); DbgTrace(1, "-GetUserCredentials- Username = %s\n", pUsername);