If command finishes synchronously the command context is not valid
anymore and cannot be accessed. Reported by Sami Farin.
SilcUInt32 argc = 0;
unsigned char **argv = NULL;
SilcUInt32 *argv_lens = NULL, *argv_types = NULL;
SilcUInt32 argc = 0;
unsigned char **argv = NULL;
SilcUInt32 *argv_lens = NULL, *argv_types = NULL;
SilcClientCommand command;
SilcClientCommandContext cmd;
char *arg;
SilcClientCommand command;
SilcClientCommandContext cmd;
char *arg;
cmd->argv = argv;
cmd->argv_lens = argv_lens;
cmd->argv_types = argv_types;
cmd->argv = argv;
cmd->argv_lens = argv_lens;
cmd->argv_types = argv_types;
- cmd->cmd_ident = silc_client_cmd_ident(conn);
+ cmd_ident = cmd->cmd_ident = silc_client_cmd_ident(conn);
cmd->called = TRUE;
cmd->verbose = TRUE;
silc_list_init(cmd->reply_callbacks,
cmd->called = TRUE;
cmd->verbose = TRUE;
silc_list_init(cmd->reply_callbacks,
silc_client_command_destructor, NULL, FALSE);
silc_fsm_start_sync(&cmd->thread, command->command);
silc_client_command_destructor, NULL, FALSE);
silc_fsm_start_sync(&cmd->thread, command->command);
}
/* Generic function to send any command. The arguments must be sent already
}
/* Generic function to send any command. The arguments must be sent already