Fix authsave to save both username and password

Update do_authsave() to call psync_set_user_pass() instead of
psync_set_pass(), ensuring both username and password are persisted.
This commit is contained in:
Levi Neely 2026-03-11 22:38:51 +01:00
parent 59a1a772e6
commit 732fefb8a6
1 changed files with 2 additions and 1 deletions

View File

@ -192,7 +192,8 @@ int clib::pclsync_lib::receive_auth(const char *pass) {
}
int clib::pclsync_lib::receive_auth_save(const char *pass) {
psync_set_pass(pass, 1);
const char *username = get_lib().username_.c_str();
psync_set_user_pass(username, pass, 1);
pthread_mutex_lock(&auth_mtx);
get_lib().password_ = std::string(pass);
pthread_cond_signal(&auth_cond);