Fixed crash that would occur if an RPC would succeed but no without
response data. -This line, and those below, will be ignored-- M client/library/engine.c
This commit is contained in:
		| @@ -165,6 +165,9 @@ ObtainSessionToken( | |||||||
|                             &pRespMsg, |                             &pRespMsg, | ||||||
|                             &respLen); |                             &respLen); | ||||||
|             if (CASA_SUCCESS(retStatus)) |             if (CASA_SUCCESS(retStatus)) | ||||||
|  |             { | ||||||
|  |                if (pRespMsg | ||||||
|  |                    && respLen != 0) | ||||||
|                { |                { | ||||||
|                   AuthenticateResp     *pAuthenticateResp; |                   AuthenticateResp     *pAuthenticateResp; | ||||||
|  |  | ||||||
| @@ -186,6 +189,11 @@ ObtainSessionToken( | |||||||
|                   } |                   } | ||||||
|                } |                } | ||||||
|                else |                else | ||||||
|  |                { | ||||||
|  |                   DbgTrace(0, "-ObtainSessionToken- Did not receive Authenticate Response data\n", 0); | ||||||
|  |                } | ||||||
|  |             } | ||||||
|  |             else | ||||||
|             { |             { | ||||||
|                DbgTrace(0, "-ObtainSessionToken- Authenticate Rpc failure, error = %08X\n", retStatus); |                DbgTrace(0, "-ObtainSessionToken- Authenticate Rpc failure, error = %08X\n", retStatus); | ||||||
|             } |             } | ||||||
| @@ -329,6 +337,9 @@ ObtainAuthTokenFromServer( | |||||||
|                          &pRespMsg, |                          &pRespMsg, | ||||||
|                          &respLen); |                          &respLen); | ||||||
|          if (CASA_SUCCESS(retStatus)) |          if (CASA_SUCCESS(retStatus)) | ||||||
|  |          { | ||||||
|  |             if (pRespMsg | ||||||
|  |                 && respLen != 0) | ||||||
|             { |             { | ||||||
|                // Create GetAuthPolicy response object |                // Create GetAuthPolicy response object | ||||||
|                retStatus = CreateGetAuthPolicyResp(pRespMsg, respLen, &pGetAuthPolicyResp); |                retStatus = CreateGetAuthPolicyResp(pRespMsg, respLen, &pGetAuthPolicyResp); | ||||||
| @@ -365,6 +376,9 @@ ObtainAuthTokenFromServer( | |||||||
|                                            &pRespMsg, |                                            &pRespMsg, | ||||||
|                                            &respLen); |                                            &respLen); | ||||||
|                            if (CASA_SUCCESS(retStatus)) |                            if (CASA_SUCCESS(retStatus)) | ||||||
|  |                            { | ||||||
|  |                               if (pRespMsg | ||||||
|  |                                   && respLen != 0) | ||||||
|                               { |                               { | ||||||
|                                  // Create GetAuthPolicy response object |                                  // Create GetAuthPolicy response object | ||||||
|                                  retStatus = CreateGetAuthTokenResp(pRespMsg, respLen, &pGetAuthTokenResp); |                                  retStatus = CreateGetAuthTokenResp(pRespMsg, respLen, &pGetAuthTokenResp); | ||||||
| @@ -381,6 +395,11 @@ ObtainAuthTokenFromServer( | |||||||
|                                  } |                                  } | ||||||
|                               } |                               } | ||||||
|                               else |                               else | ||||||
|  |                               { | ||||||
|  |                                  DbgTrace(0, "-ObtainAuthTokenFromServer- Did not receive GetAuthToken Response data\n", 0); | ||||||
|  |                               } | ||||||
|  |                            } | ||||||
|  |                            else | ||||||
|                            { |                            { | ||||||
|                               DbgTrace(0, "-ObtainAuthTokenFromServer- GetAuthToken Rpc failure, error = %08X\n", retStatus); |                               DbgTrace(0, "-ObtainAuthTokenFromServer- GetAuthToken Rpc failure, error = %08X\n", retStatus); | ||||||
|                            } |                            } | ||||||
| @@ -409,6 +428,11 @@ ObtainAuthTokenFromServer( | |||||||
|                } |                } | ||||||
|             } |             } | ||||||
|             else |             else | ||||||
|  |             { | ||||||
|  |                DbgTrace(0, "-ObtainAuthTokenFromServer- Did not receive GetAuthPolicy Response data\n", 0); | ||||||
|  |             } | ||||||
|  |          } | ||||||
|  |          else | ||||||
|          { |          { | ||||||
|             DbgTrace(0, "-ObtainAuthTokenFromServer- GetAuthPolicy Rpc failure, error = %08X\n", retStatus); |             DbgTrace(0, "-ObtainAuthTokenFromServer- GetAuthPolicy Rpc failure, error = %08X\n", retStatus); | ||||||
|          } |          } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user