mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 17:17:42 +00:00
Prevent loss of user access code on LAN reselect
Keep user access code intact to maintain access rights even if device slot is unpopulated, ensuring continuous connection and status message reception.
This commit is contained in:
@@ -2166,7 +2166,12 @@ void GUI_App::init_networking_callbacks()
|
||||
obj->is_tunnel_mqtt = tunnel;
|
||||
obj->command_request_push_all(true);
|
||||
obj->command_get_version();
|
||||
obj->erase_user_access_code();
|
||||
// Do NOT erase user code. Erasing will cause has_access_right to be false
|
||||
// whenever the device slot isn't populated yet (e.g. LAN reselect after logout).
|
||||
// This filters this printer out of get_my_machine_list, silently dropping every status message
|
||||
// AND the get_access_code reply that would refill the code, leaving a permanently
|
||||
// dead "connected but no live data" state.
|
||||
// obj -> set_user_access_code("");
|
||||
obj->command_get_access_code();
|
||||
if (m_agent)
|
||||
m_agent->install_device_cert(obj->get_dev_id(), obj->is_lan_mode_printer());
|
||||
|
||||
Reference in New Issue
Block a user