[libfko] bug fix to apply ctx initialization check before attempting to use ctx->message_type in fko_set_spa_client_timeout()

This commit is contained in:
Michael Rash
2013-05-12 15:02:31 -04:00
parent 38395b04c6
commit 6d0f970b34
+3 -1
View File
@@ -36,7 +36,7 @@
int
fko_set_spa_client_timeout(fko_ctx_t ctx, const int timeout)
{
int old_msg_type = ctx->message_type;
int old_msg_type;
/* Context must be initialized.
*/
@@ -48,6 +48,8 @@ fko_set_spa_client_timeout(fko_ctx_t ctx, const int timeout)
if(timeout < 0)
return(FKO_ERROR_INVALID_DATA);
old_msg_type = ctx->message_type;
ctx->client_timeout = timeout;
ctx->state |= FKO_DATA_MODIFIED;