[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user