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:
parent
59a1a772e6
commit
732fefb8a6
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue