tmp commit

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-03-23 19:57:58 +08:00
parent c65a3b2489
commit e24e05ba5c
2 changed files with 16 additions and 4 deletions

View File

@ -1631,8 +1631,14 @@ class FFI {
}
/// Login with [password], choose if the client should [remember] it.
void login(String id, String password, bool remember) {
bind.sessionLogin(id: id, password: password, remember: remember);
void login(String osUsername, String osPassword, String id, String password,
bool remember) {
bind.sessionLogin(
id: id,
os_username: osUsername,
os_password: osPassword,
password: password,
remember: remember);
}
/// Close the remote session.

View File

@ -136,9 +136,15 @@ pub fn session_get_option(id: String, arg: String) -> Option<String> {
}
}
pub fn session_login(id: String, password: String, remember: bool) {
pub fn session_login(
id: String,
os_username: String,
os_password: String,
password: String,
remember: bool,
) {
if let Some(session) = SESSIONS.read().unwrap().get(&id) {
session.login(password, remember);
session.login(os_username, os_password, password, remember);
}
}