Properly serialize UUIDs in remotexpc

This commit is contained in:
Jackson Coxson
2025-08-24 17:52:21 -06:00
parent 2efc205221
commit bb432d8807

View File

@@ -252,7 +252,6 @@ impl XPCObject {
} }
XPCObject::Uuid(uuid) => { XPCObject::Uuid(uuid) => {
buf.extend_from_slice(&(XPCType::Uuid as u32).to_le_bytes()); buf.extend_from_slice(&(XPCType::Uuid as u32).to_le_bytes());
buf.extend_from_slice(&16_u32.to_le_bytes());
buf.extend_from_slice(uuid.as_bytes()); buf.extend_from_slice(uuid.as_bytes());
} }
XPCObject::FileTransfer { msg_id, data } => { XPCObject::FileTransfer { msg_id, data } => {
@@ -412,6 +411,13 @@ impl XPCObject {
} }
} }
pub fn to_dictionary(self) -> Option<Dictionary> {
match self {
XPCObject::Dictionary(dict) => Some(dict),
_ => None,
}
}
pub fn as_array(&self) -> Option<&Vec<Self>> { pub fn as_array(&self) -> Option<&Vec<Self>> {
match self { match self {
XPCObject::Array(array) => Some(array), XPCObject::Array(array) => Some(array),