Fixed all of the compiler warnings for the client components.
This commit is contained in:
		| @@ -265,7 +265,7 @@ GetAuthMechToken( | ||||
|    CasaStatus    retStatus = CasaStatusBuild(CASA_SEVERITY_ERROR, | ||||
|                                              CASA_FACILITY_AUTHTOKEN, | ||||
|                                              CASA_STATUS_UNSUCCESSFUL); | ||||
|    AuthTokenIf   *pAuthTokenIf; | ||||
|    AuthTokenIf   *pAuthTokenIf = NULL; | ||||
|  | ||||
|    DbgTrace(1, "-GetAuthMechToken- Start\n", 0); | ||||
|  | ||||
|   | ||||
| @@ -177,7 +177,7 @@ BuildAuthenticateMsg( | ||||
|       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; | ||||
| } | ||||
| @@ -689,11 +689,11 @@ CreateAuthenticateResp( | ||||
|  | ||||
|          // Set the start and end element handlers | ||||
|          XML_SetElementHandler(p, | ||||
|                                AuthRespStartElementHandler, | ||||
|                                AuthRespEndElementHandler); | ||||
|                                (XML_StartElementHandler) AuthRespStartElementHandler, | ||||
|                                (XML_EndElementHandler) AuthRespEndElementHandler); | ||||
|  | ||||
|          // Set the character data handler | ||||
|          XML_SetCharacterDataHandler(p, AuthRespCharDataHandler); | ||||
|          XML_SetCharacterDataHandler(p, (XML_CharacterDataHandler) AuthRespCharDataHandler); | ||||
|  | ||||
|  | ||||
|          // Set our user data | ||||
|   | ||||
| @@ -626,7 +626,7 @@ CreateAuthPolicy( | ||||
|    // Decode the data | ||||
|    retStatus = DecodeData(pEncodedData, | ||||
|                           encodedDataLen, | ||||
|                           &pData, | ||||
|                           (void**) &pData, | ||||
|                           &dataLen); | ||||
|    if (CASA_SUCCESS(retStatus)) | ||||
|    { | ||||
| @@ -655,11 +655,11 @@ CreateAuthPolicy( | ||||
|  | ||||
|             // Set the start and end element handlers | ||||
|             XML_SetElementHandler(p, | ||||
|                                   AuthPolicyStartElementHandler, | ||||
|                                   AuthPolicyEndElementHandler); | ||||
|                                   (XML_StartElementHandler) AuthPolicyStartElementHandler, | ||||
|                                   (XML_EndElementHandler) AuthPolicyEndElementHandler); | ||||
|  | ||||
|             // Set the character data handler | ||||
|             XML_SetCharacterDataHandler(p, AuthPolicyCharDataHandler); | ||||
|             XML_SetCharacterDataHandler(p, (XML_CharacterDataHandler) AuthPolicyCharDataHandler); | ||||
|  | ||||
|             // Set our user data | ||||
|             XML_SetUserData(p, &authPolicyParse); | ||||
|   | ||||
| @@ -34,22 +34,16 @@ | ||||
|  | ||||
| //===[ Global variables ]================================================== | ||||
|  | ||||
| // Non-host specific key name | ||||
| static | ||||
| char     g_allHosts[] = "AllHosts"; | ||||
|  | ||||
| static | ||||
| int      g_cacheEntryCount = 0; | ||||
|  | ||||
| HANDLE   g_hCASAContext; | ||||
|  | ||||
|  | ||||
| //++======================================================================= | ||||
| AuthCacheEntry* | ||||
| CreateAuthTokenCacheEntry( | ||||
|    IN    const char *pCacheKey, | ||||
|    IN    const char *pGroupOrHostName, | ||||
|    IN    CasaStatus status, | ||||
|    IN    unsigned char *pToken, | ||||
|    IN    char *pToken, | ||||
|    IN    int entryLifetime // seconds (0 == Lives forever) | ||||
|    ) | ||||
| // | ||||
| @@ -67,9 +61,9 @@ CreateAuthTokenCacheEntry( | ||||
|    CasaStatus           retStatus; | ||||
|    SSCS_KEYCHAIN_ID_T   sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"}; | ||||
|    SSCS_SECRET_ID_T     sharedId = {27, "CASA_AUTHENTICATION_TOKENS"}; | ||||
|    uint32_t             tokenSize, entrySize, keySize; | ||||
|    int32_t              tokenSize, entrySize, keySize; | ||||
|    AuthCacheEntry       *pEntry = NULL; | ||||
|    unsigned char     *pKey; | ||||
|    char                 *pKey; | ||||
|  | ||||
|  | ||||
|    DbgTrace(1, "-CreateAuthTokenCacheEntry- Start\n", 0); | ||||
| @@ -130,12 +124,12 @@ CreateAuthTokenCacheEntry( | ||||
|                                           0, | ||||
|                                           &sessionKeyChain, | ||||
|                                           &sharedId, | ||||
|                                           pKey, | ||||
|                                           (SS_UTF8_T*) pKey, | ||||
|                                           keySize, | ||||
|                                           (uint8_t *) pEntry, | ||||
|                                           &entrySize, | ||||
|                                           (uint32_t*) &entrySize, | ||||
|                                           NULL, | ||||
|                                           NULL); | ||||
|                                           (SSCS_EXT_T*) NULL); | ||||
|        | ||||
|        | ||||
|          free(pKey); | ||||
| @@ -154,7 +148,7 @@ CreateAuthTokenCacheEntry( | ||||
|                                   CASA_STATUS_INSUFFICIENT_RESOURCES); | ||||
|    } | ||||
|  | ||||
|    DbgTrace(1, "-CreateAuthTokenCacheEntry- End, pEntry = %08X\n", pEntry); | ||||
|    DbgTrace(1, "-CreateAuthTokenCacheEntry- End, pEntry = %0lX\n", (long) pEntry); | ||||
|  | ||||
|    return pEntry; | ||||
| } | ||||
| @@ -165,7 +159,7 @@ AuthCacheEntry* | ||||
| CreateSessionTokenCacheEntry( | ||||
|    IN    const char *pCacheKey, | ||||
|    IN    CasaStatus status, | ||||
|    IN    unsigned char *pToken, | ||||
|    IN    char *pToken, | ||||
|    IN    int entryLifetime // seconds (0 == Lives forever) | ||||
|    ) | ||||
| // | ||||
| @@ -183,7 +177,7 @@ CreateSessionTokenCacheEntry( | ||||
|    CasaStatus           retStatus; | ||||
|    SSCS_KEYCHAIN_ID_T   sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"}; | ||||
|    SSCS_SECRET_ID_T     sharedId = {20, "CASA_SESSION_TOKENS"}; | ||||
|    uint32_t             tokenSize, entrySize; | ||||
|    int32_t              tokenSize, entrySize; | ||||
|    AuthCacheEntry       *pEntry = NULL; | ||||
|  | ||||
|  | ||||
| @@ -235,12 +229,12 @@ CreateSessionTokenCacheEntry( | ||||
|                                        0, | ||||
|                                        &sessionKeyChain, | ||||
|                                        &sharedId, | ||||
|                                        (char *)pCacheKey, | ||||
|                                        (SS_UTF8_T*) pCacheKey, | ||||
|                                        (uint32_t) strlen(pCacheKey) + 1, | ||||
|                                        (uint8_t *) pEntry, | ||||
|                                        &entrySize, | ||||
|                                        (uint32_t*) &entrySize, | ||||
|                                        NULL, | ||||
|                                        NULL); | ||||
|                                        (SSCS_EXT_T*) NULL); | ||||
|    } | ||||
|    else | ||||
|    { | ||||
| @@ -249,7 +243,7 @@ CreateSessionTokenCacheEntry( | ||||
|                                   CASA_STATUS_INSUFFICIENT_RESOURCES); | ||||
|    } | ||||
|  | ||||
|    DbgTrace(1, "-CreateSessionTokenCacheEntry- End, pEntry = %08X\n", pEntry); | ||||
|    DbgTrace(1, "-CreateSessionTokenCacheEntry- End, pEntry = %0lX\n", (long) pEntry); | ||||
|  | ||||
|    return pEntry; | ||||
| } | ||||
| @@ -272,7 +266,7 @@ FreeAuthCacheEntry( | ||||
| // L2 | ||||
| //=======================================================================-- | ||||
| { | ||||
|    DbgTrace(1, "-FreeAuthCacheEntry- Start, pEntry = %08X\n", pEntry); | ||||
|    DbgTrace(1, "-FreeAuthCacheEntry- Start, pEntry = %0lX\n", (long) pEntry); | ||||
|  | ||||
|    // Free the entry | ||||
|    free(pEntry); | ||||
| @@ -370,7 +364,7 @@ FindSessionTokenEntryInCache( | ||||
|    CasaStatus           retStatus; | ||||
|    SSCS_KEYCHAIN_ID_T   sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"}; | ||||
|    SSCS_SECRET_ID_T     sharedId = {20, "CASA_SESSION_TOKENS"}; | ||||
|    uint32_t             valueLength, bytesRequired; | ||||
|    int32_t              valueLength, bytesRequired; | ||||
|    AuthCacheEntry       *pEntry = NULL; | ||||
|  | ||||
|  | ||||
| @@ -383,13 +377,13 @@ FindSessionTokenEntryInCache( | ||||
|                                    0, | ||||
|                                    &sessionKeyChain, | ||||
|                                    &sharedId, | ||||
|                                    (char *)pCacheKey, | ||||
|                                    (SS_UTF8_T*) pCacheKey, | ||||
|                                    (uint32_t) strlen(pCacheKey) + 1, | ||||
|                                    NULL, | ||||
|                                    &valueLength, | ||||
|                                    NULL, | ||||
|                                    &bytesRequired, | ||||
|                                    NULL); | ||||
|                                    (uint32_t*) &valueLength, | ||||
|                                    (SSCS_PASSWORD_T*) NULL, | ||||
|                                    (uint32_t*) &bytesRequired, | ||||
|                                    (SSCS_EXT_T*) NULL); | ||||
|  | ||||
|    if (retStatus == NSSCS_E_ENUM_BUFF_TOO_SHORT | ||||
|        && bytesRequired != 0) | ||||
| @@ -405,13 +399,13 @@ FindSessionTokenEntryInCache( | ||||
|                                          0, | ||||
|                                          &sessionKeyChain, | ||||
|                                          &sharedId, | ||||
|                                          (char *)pCacheKey, | ||||
|                                          (SS_UTF8_T*) pCacheKey, | ||||
|                                          (uint32_t) strlen(pCacheKey) + 1, | ||||
|                                          (uint8_t *) pEntry, | ||||
|                                          &valueLength, | ||||
|                                          NULL, | ||||
|                                          &bytesRequired, | ||||
|                                          NULL); | ||||
|                                          (uint32_t*) &valueLength, | ||||
|                                          (SSCS_PASSWORD_T*) NULL, | ||||
|                                          (uint32_t*) &bytesRequired, | ||||
|                                          (SSCS_EXT_T*) NULL); | ||||
|          if (CASA_SUCCESS(retStatus)) | ||||
|          { | ||||
|             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; | ||||
| } | ||||
| @@ -460,9 +454,9 @@ FindAuthTokenEntryInCache( | ||||
|    CasaStatus           retStatus; | ||||
|    SSCS_KEYCHAIN_ID_T   sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"}; | ||||
|    SSCS_SECRET_ID_T     sharedId = {27, "CASA_AUTHENTICATION_TOKENS"}; | ||||
|    uint32_t             valueLength, bytesRequired, keySize; | ||||
|    int32_t              valueLength, bytesRequired, keySize; | ||||
|    AuthCacheEntry       *pEntry = NULL; | ||||
|    unsigned char        *pKey; | ||||
|    char                 *pKey; | ||||
|  | ||||
|  | ||||
|    DbgTrace(1, "-FindAuthTokenEntryInCache- Start\n", 0); | ||||
| @@ -483,13 +477,13 @@ FindAuthTokenEntryInCache( | ||||
|                                       0, | ||||
|                                       &sessionKeyChain, | ||||
|                                       &sharedId, | ||||
|                                       pKey, | ||||
|                                       (SS_UTF8_T*) pKey, | ||||
|                                       keySize, | ||||
|                                       NULL, | ||||
|                                       &valueLength, | ||||
|                                       NULL, | ||||
|                                       &bytesRequired, | ||||
|                                       NULL); | ||||
|                                       (uint32_t*) &valueLength, | ||||
|                                       (SSCS_PASSWORD_T*) NULL, | ||||
|                                       (uint32_t*) &bytesRequired, | ||||
|                                       (SSCS_EXT_T*) NULL); | ||||
|        | ||||
|       if (retStatus == NSSCS_E_ENUM_BUFF_TOO_SHORT | ||||
|           && bytesRequired != 0) | ||||
| @@ -505,13 +499,13 @@ FindAuthTokenEntryInCache( | ||||
|                                             0, | ||||
|                                             &sessionKeyChain, | ||||
|                                             &sharedId, | ||||
|                                             pKey, | ||||
|                                             (SS_UTF8_T*) pKey, | ||||
|                                             keySize, | ||||
|                                             (uint8_t *) pEntry, | ||||
|                                             &valueLength, | ||||
|                                             NULL, | ||||
|                                             &bytesRequired, | ||||
|                                             NULL); | ||||
|                                             (uint32_t*) &valueLength, | ||||
|                                             (SSCS_PASSWORD_T*) NULL, | ||||
|                                             (uint32_t*) &bytesRequired, | ||||
|                                             (SSCS_EXT_T*) NULL); | ||||
|             if (CASA_SUCCESS(retStatus)) | ||||
|             { | ||||
|                if (pEntry->doesNotExpire == false | ||||
| @@ -537,7 +531,7 @@ FindAuthTokenEntryInCache( | ||||
|       free(pKey); | ||||
|    } | ||||
|  | ||||
|    DbgTrace(1, "-FindAuthTokenEntryInCache- End, pEntry = %08X\n", pEntry); | ||||
|    DbgTrace(1, "-FindAuthTokenEntryInCache- End, pEntry = %0lX\n", (long) pEntry); | ||||
|  | ||||
|    return pEntry; | ||||
| } | ||||
|   | ||||
| @@ -478,7 +478,7 @@ ObtainAuthToken( | ||||
|    CasaStatus        retStatus = CASA_STATUS_SUCCESS; | ||||
|    AuthCacheEntry    *pCacheEntry; | ||||
|    char              *pNormalizedHostName; | ||||
|    unsigned char     *pToken; | ||||
|    char              *pToken; | ||||
|    HANDLE            hUserMutex = NULL; | ||||
|  | ||||
|    DbgTrace(1, "-ObtainAuthToken- Start\n", 0); | ||||
|   | ||||
| @@ -70,8 +70,8 @@ typedef struct _GetAuthPolicyRespParse | ||||
| //++======================================================================= | ||||
| char* | ||||
| BuildGetAuthPolicyMsg( | ||||
|    IN    char *pServiceName, | ||||
|    IN    char *pHostName) | ||||
|    IN    const char *pServiceName, | ||||
|    IN    const char *pHostName) | ||||
| // | ||||
| //  Arguments:  | ||||
| // | ||||
| @@ -158,7 +158,7 @@ BuildGetAuthPolicyMsg( | ||||
|       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; | ||||
| } | ||||
| @@ -630,11 +630,11 @@ CreateGetAuthPolicyResp( | ||||
|  | ||||
|          // Set the start and end element handlers | ||||
|          XML_SetElementHandler(p, | ||||
|                                GetAuthPolicyRespStartElementHandler, | ||||
|                                GetAuthPolicyRespEndElementHandler); | ||||
|                                (XML_StartElementHandler) GetAuthPolicyRespStartElementHandler, | ||||
|                                (XML_EndElementHandler) GetAuthPolicyRespEndElementHandler); | ||||
|  | ||||
|          // Set the character data handler | ||||
|          XML_SetCharacterDataHandler(p, GetAuthPolicyRespCharDataHandler); | ||||
|          XML_SetCharacterDataHandler(p, (XML_CharacterDataHandler) GetAuthPolicyRespCharDataHandler); | ||||
|  | ||||
|  | ||||
|          // Set our user data | ||||
|   | ||||
| @@ -69,8 +69,8 @@ typedef struct _GetAuthTokenRespParse | ||||
| //++======================================================================= | ||||
| char* | ||||
| BuildGetAuthTokenMsg( | ||||
|    IN    char *pServiceName, | ||||
|    IN    char *pHostName, | ||||
|    IN    const char *pServiceName, | ||||
|    IN    const char *pHostName, | ||||
|    IN    char *pSessionToken) | ||||
| // | ||||
| //  Arguments:  | ||||
| @@ -174,7 +174,7 @@ BuildGetAuthTokenMsg( | ||||
|       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; | ||||
| } | ||||
| @@ -680,11 +680,11 @@ CreateGetAuthTokenResp( | ||||
|  | ||||
|          // Set the start and end element handlers | ||||
|          XML_SetElementHandler(p, | ||||
|                                GetAuthTokenRespStartElementHandler, | ||||
|                                GetAuthTokenRespEndElementHandler); | ||||
|                                (XML_StartElementHandler) GetAuthTokenRespStartElementHandler, | ||||
|                                (XML_EndElementHandler) GetAuthTokenRespEndElementHandler); | ||||
|  | ||||
|          // Set the character data handler | ||||
|          XML_SetCharacterDataHandler(p, GetAuthTokenRespCharDataHandler); | ||||
|          XML_SetCharacterDataHandler(p, (XML_CharacterDataHandler) GetAuthTokenRespCharDataHandler); | ||||
|  | ||||
|  | ||||
|          // Set our user data | ||||
|   | ||||
| @@ -149,8 +149,8 @@ GetAuthMechToken( | ||||
| extern | ||||
| char* | ||||
| BuildGetAuthPolicyMsg( | ||||
|    IN    char *pServiceName, | ||||
|    IN    char *pHostName); | ||||
|    IN    const char *pServiceName, | ||||
|    IN    const char *pHostName); | ||||
|  | ||||
| extern | ||||
| CasaStatus | ||||
| @@ -209,8 +209,8 @@ RelAuthenticateResp( | ||||
| extern | ||||
| char* | ||||
| BuildGetAuthTokenMsg( | ||||
|    IN    char *pServiceName, | ||||
|    IN    char *pHostName, | ||||
|    IN    const char *pServiceName, | ||||
|    IN    const char *pHostName, | ||||
|    IN    char *pSessionToken); | ||||
|  | ||||
| extern | ||||
| @@ -234,7 +234,7 @@ AuthCacheEntry* | ||||
| CreateSessionTokenCacheEntry( | ||||
|    IN    const char *pCacheKey, | ||||
|    IN	   CasaStatus status, | ||||
|    IN    unsigned char *pToken, | ||||
|    IN    char *pToken, | ||||
|    IN    int entryLifetime); | ||||
|  | ||||
| extern | ||||
| @@ -243,7 +243,7 @@ CreateAuthTokenCacheEntry( | ||||
|    IN    const char *pCacheKey, | ||||
|    IN    const char *pHostName, | ||||
|    IN	   CasaStatus status, | ||||
|    IN    unsigned char *pToken, | ||||
|    IN    char *pToken, | ||||
|    IN    int entryLifetime); | ||||
|  | ||||
| extern | ||||
| @@ -337,8 +337,8 @@ InitializeHostNameNormalization(void); | ||||
| extern | ||||
| RpcSession* | ||||
| OpenRpcSession( | ||||
|    IN    char *pHostName, | ||||
|    IN    uint16_t hostPort); | ||||
|    IN    const char *pHostName, | ||||
|    IN    const uint16_t hostPort); | ||||
|  | ||||
| extern | ||||
| void | ||||
|   | ||||
| @@ -353,14 +353,14 @@ GetTickCount(void) | ||||
|       long  ticksPerSecond; | ||||
|  | ||||
|       ticksPerSecond = sysconf(_SC_CLK_TCK); | ||||
|       DbgTrace(3, "-GetTickCount- TicksPerSec = %0X\n", ticksPerSecond); | ||||
|       DbgTrace(3, "-GetTickCount- TicksPerSec = %0lX\n", ticksPerSecond); | ||||
|       g_milliSecondsPerTicks = 1000 / ticksPerSecond; | ||||
|    } | ||||
|  | ||||
|    // Determine the tickCount as milliseconds | ||||
|    tickCount = g_milliSecondsPerTicks * times(&tm); | ||||
|  | ||||
|    DbgTrace(2, "-GetTickCount- End, retValue = %0X\n", tickCount); | ||||
|    DbgTrace(2, "-GetTickCount- End, retValue = %0lX\n", tickCount); | ||||
|  | ||||
|    return tickCount; | ||||
| } | ||||
| @@ -410,8 +410,6 @@ CreateUserMutex( | ||||
|       DbgTrace(0, "-CreateUserMutex- sprintf failed, error = %d\n", errno); | ||||
|    } | ||||
|  | ||||
| exit: | ||||
|  | ||||
|    DbgTrace(1, "-CreateUserMutex- End, retStatus\n", retStatus); | ||||
|  | ||||
|    return retStatus; | ||||
| @@ -545,10 +543,10 @@ OpenLibrary( | ||||
|    libHandle = dlopen(pFileName, RTLD_LAZY); | ||||
|    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; | ||||
| } | ||||
| @@ -602,10 +600,10 @@ GetFunctionPtr( | ||||
|    pFuncPtr = dlsym(libHandle, pFunctionName); | ||||
|    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; | ||||
| } | ||||
| @@ -793,7 +791,7 @@ NormalizeHostName( | ||||
|    // Release our synchronization mutex | ||||
|    pthread_mutex_unlock(&g_hNormalizedHostNameCacheMutex); | ||||
|  | ||||
|    DbgTrace(1, "-NormalizeHostName- End, pNormalizedName = %08X\n", pNormalizedName); | ||||
|    DbgTrace(1, "-NormalizeHostName- End, pNormalizedName = %0lX\n", (long) pNormalizedName); | ||||
|  | ||||
|    return pNormalizedName; | ||||
| } | ||||
|   | ||||
| @@ -113,8 +113,8 @@ CurlWriteCallback( | ||||
| //++======================================================================= | ||||
| RpcSession* | ||||
| OpenRpcSession( | ||||
|    IN    char *pHostName, | ||||
|    IN    uint16_t hostPort) | ||||
|    IN    const char *pHostName, | ||||
|    IN    const uint16_t hostPort) | ||||
| // | ||||
| //  Arguments:  | ||||
| // | ||||
| @@ -127,7 +127,7 @@ OpenRpcSession( | ||||
| // L2 | ||||
| //=======================================================================-- | ||||
| { | ||||
|    RpcSession  *pSession; | ||||
|    RpcSession  *pSession = NULL; | ||||
|    char        *pPartialHttpUrl = NULL; | ||||
|    char        *pPartialHttpsUrl = NULL; | ||||
|    int         hostNameLen = strlen(pHostName); | ||||
| @@ -244,7 +244,7 @@ OpenRpcSession( | ||||
|    if (pPartialHttpsUrl) | ||||
|       free(pPartialHttpsUrl); | ||||
|  | ||||
|    DbgTrace(2, "-OpenRpcSession- End, pSession = %08X\n", pSession); | ||||
|    DbgTrace(2, "-OpenRpcSession- End, pSession = %0lX\n", (long) pSession); | ||||
|  | ||||
|    return pSession; | ||||
| } | ||||
| @@ -374,7 +374,7 @@ InternalRpc( | ||||
|                      } | ||||
|                      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, | ||||
|                                                     CASA_FACILITY_AUTHTOKEN, | ||||
|                                                     CASA_STATUS_UNSUCCESSFUL); | ||||
|   | ||||
| @@ -169,7 +169,7 @@ AuthTokenIf_GetAuthToken( | ||||
| //=======================================================================-- | ||||
| { | ||||
|    CasaStatus        retStatus; | ||||
|    char              *pKrbServiceName = pMechInfo; | ||||
|    char const        *pKrbServiceName = pMechInfo; | ||||
|    OM_uint32         gssMajStat; | ||||
|    OM_uint32         gssMinStat; | ||||
|    gss_buffer_desc   gssBuffer; | ||||
|   | ||||
| @@ -67,10 +67,9 @@ GetUserCredentials( | ||||
|    char                    *pUsername; | ||||
|    char                    *pPassword; | ||||
|    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_SECRET_ID_T        secretId = {0}; | ||||
|    SSCS_SECRET_ID_T        sharedSecretId = {0}; | ||||
|     | ||||
|    DbgTrace(1, "-GetUserCredentials- Start\n", 0); | ||||
|  | ||||
| @@ -84,7 +83,7 @@ GetUserCredentials( | ||||
|    if (secretId.len <= NSSCS_MAX_SECRET_ID_LEN) | ||||
|    { | ||||
|       // 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 | ||||
|       credential.unFlags = USERNAME_TYPE_CN_F; | ||||
| @@ -95,19 +94,19 @@ GetUserCredentials( | ||||
|                                   NULL, | ||||
|                                   &credtype, | ||||
|                                   &credential, | ||||
|                                   NULL); | ||||
|                                   (SSCS_EXT_T*) NULL); | ||||
|       if (rcode != NSSCS_SUCCESS) | ||||
|       { | ||||
|          // There were no credentials for the realm, now try to obtain the | ||||
|          // desktop credentials. | ||||
|          secretId.len = sscs_Utf8Strlen("Desktop") + 1; | ||||
|          sscs_Utf8Strcpy(secretId.id, "Desktop"); | ||||
|          sscs_Utf8Strcpy((char*) secretId.id, "Desktop"); | ||||
|          rcode = miCASAGetCredential(0, | ||||
|                                      &secretId, | ||||
|                                      NULL, | ||||
|                                      &credtype, | ||||
|                                      &credential, | ||||
|                                      NULL); | ||||
|                                      (SSCS_EXT_T*) NULL); | ||||
|       } | ||||
|    } | ||||
|    else | ||||
| @@ -124,18 +123,18 @@ GetUserCredentials( | ||||
|        && credential.password != NULL) | ||||
|    { | ||||
|       // Allocate a buffer to return the username | ||||
|       pUsername = (char*) malloc(strlen(credential.username) + 1); | ||||
|       pUsername = (char*) malloc(strlen((char*) credential.username) + 1); | ||||
|       if (pUsername) | ||||
|       { | ||||
|          // 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 | ||||
|          pPassword = (char*) malloc(strlen(credential.password) + 1); | ||||
|          pPassword = (char*) malloc(strlen((char*) credential.password) + 1); | ||||
|          if (pPassword) | ||||
|          { | ||||
|             // 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); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user