fix(qconnect): announce the persisted device name from every identity path
With a custom name set, the controller bootstrap announced it but the deferred renderer join and resolve_local_identity used the DEFAULT name — one device_uuid, two friendly names. When the server's ADD_RENDERER omits the uuid (observed on the wire), the name-fingerprint self-match failed, local_renderer_id stayed None and the is_local_renderer_active gate dropped every renderer report (mute renderer, frozen controller seekbar). default_qconnect_device_info() now resolves the persisted name on both frontends, so all announce paths agree by construction. Wire-verified: ADD_RENDERER carries the custom name and reports flow. km
This commit is contained in:
2 files changed
+24
-4
No files matched your search
@@ -266,9 +266,22 @@ pub fn build_set_position_player_state_request(
|
||||
}
|
||||
}
|
||||
|
||||
/// Build the device-info payload with the default friendly name.
|
||||
/// Load the persisted custom device name from the daemon-root settings DB.
|
||||
/// Fail-open: None when `init_settings_db_path` never ran or on any read error.
|
||||
fn load_persisted_device_name() -> Option<String> {
|
||||
qconnect_settings_db_path().and_then(|path| load_device_name_at(&path))
|
||||
}
|
||||
|
||||
/// Build the device-info payload with the EFFECTIVE friendly name: the persisted
|
||||
/// custom device name when one is set, else the default. The persisted name must
|
||||
/// win here (not only at the controller-bootstrap call site that threads it
|
||||
/// explicitly): with a custom name set, announcing the DEFAULT name from the
|
||||
/// renderer join / local identity gives ONE device_uuid TWO friendly names, and
|
||||
/// when the server's ADD_RENDERER omits the uuid the name-fingerprint self-match
|
||||
/// fails -> `local_renderer_id = None` -> every renderer report is dropped by the
|
||||
/// `is_local_renderer_active` gate (mute renderer, frozen controller seekbar).
|
||||
pub fn default_qconnect_device_info() -> QconnectDeviceInfoPayload {
|
||||
default_qconnect_device_info_with_name(None)
|
||||
default_qconnect_device_info_with_name(load_persisted_device_name().as_deref())
|
||||
}
|
||||
|
||||
/// Build the device-info payload, overriding the friendly name when a custom
|
||||
|
||||
Reference in new issue
Block a user