Loading system/gd/rust/linux/client/src/command_handler.rs +3 −3 Original line number Diff line number Diff line Loading @@ -1536,7 +1536,7 @@ impl CommandHandler { let (addr, sock_type, psm_or_uuid) = (&get_arg(args, 1)?, &get_arg(args, 2)?, &get_arg(args, 3)?); let device = BluetoothDevice { address: addr.clone().into(), address: String::from(*addr), name: String::from("Socket Connect Device"), }; Loading @@ -1558,7 +1558,7 @@ impl CommandHandler { match &sock_type[0..] { "l2cap" => { let psm = match psm_or_uuid.clone().parse::<i32>() { let psm = match psm_or_uuid.parse::<i32>() { Ok(v) => v, Err(e) => { return Err(CommandError::Failed(format!( Loading @@ -1583,7 +1583,7 @@ impl CommandHandler { } } "rfcomm" => { let uuid = match UuidHelper::parse_string(psm_or_uuid.clone()) { let uuid = match UuidHelper::parse_string(*psm_or_uuid) { Some(uu) => uu, None => { return Err(CommandError::Failed(format!( Loading system/gd/rust/linux/stack/src/bluetooth_gatt.rs +2 −2 Original line number Diff line number Diff line Loading @@ -3175,7 +3175,7 @@ impl BtifGattClientCallbacks for BluetoothGatt { } fn congestion_cb(&mut self, conn_id: i32, congested: bool) { if let Some(mut client) = self.context_map.get_client_by_conn_id_mut(conn_id) { if let Some(client) = self.context_map.get_client_by_conn_id_mut(conn_id) { client.is_congested = congested; if !client.is_congested { let cbid = client.cbid; Loading Loading @@ -3711,7 +3711,7 @@ impl BtifGattServerCallbacks for BluetoothGatt { } fn congestion_cb(&mut self, conn_id: i32, congested: bool) { if let Some(mut server) = self.server_context_map.get_mut_by_conn_id(conn_id) { if let Some(server) = self.server_context_map.get_mut_by_conn_id(conn_id) { server.is_congested = congested; if !server.is_congested { let cbid = server.cbid; Loading system/gd/rust/topshim/src/btif.rs +1 −1 Original line number Diff line number Diff line Loading @@ -559,7 +559,7 @@ impl BluetoothProperty { // Do an unsafe cast to binding:: type and assign the values // The underlying memory location is provided by |data| which will // have enough space because it uses get_len() let mut record = let record = unsafe { &mut *(data.as_mut_ptr() as *mut bindings::bt_service_record_t) }; record.uuid = sr.uuid; record.channel = sr.channel; Loading Loading
system/gd/rust/linux/client/src/command_handler.rs +3 −3 Original line number Diff line number Diff line Loading @@ -1536,7 +1536,7 @@ impl CommandHandler { let (addr, sock_type, psm_or_uuid) = (&get_arg(args, 1)?, &get_arg(args, 2)?, &get_arg(args, 3)?); let device = BluetoothDevice { address: addr.clone().into(), address: String::from(*addr), name: String::from("Socket Connect Device"), }; Loading @@ -1558,7 +1558,7 @@ impl CommandHandler { match &sock_type[0..] { "l2cap" => { let psm = match psm_or_uuid.clone().parse::<i32>() { let psm = match psm_or_uuid.parse::<i32>() { Ok(v) => v, Err(e) => { return Err(CommandError::Failed(format!( Loading @@ -1583,7 +1583,7 @@ impl CommandHandler { } } "rfcomm" => { let uuid = match UuidHelper::parse_string(psm_or_uuid.clone()) { let uuid = match UuidHelper::parse_string(*psm_or_uuid) { Some(uu) => uu, None => { return Err(CommandError::Failed(format!( Loading
system/gd/rust/linux/stack/src/bluetooth_gatt.rs +2 −2 Original line number Diff line number Diff line Loading @@ -3175,7 +3175,7 @@ impl BtifGattClientCallbacks for BluetoothGatt { } fn congestion_cb(&mut self, conn_id: i32, congested: bool) { if let Some(mut client) = self.context_map.get_client_by_conn_id_mut(conn_id) { if let Some(client) = self.context_map.get_client_by_conn_id_mut(conn_id) { client.is_congested = congested; if !client.is_congested { let cbid = client.cbid; Loading Loading @@ -3711,7 +3711,7 @@ impl BtifGattServerCallbacks for BluetoothGatt { } fn congestion_cb(&mut self, conn_id: i32, congested: bool) { if let Some(mut server) = self.server_context_map.get_mut_by_conn_id(conn_id) { if let Some(server) = self.server_context_map.get_mut_by_conn_id(conn_id) { server.is_congested = congested; if !server.is_congested { let cbid = server.cbid; Loading
system/gd/rust/topshim/src/btif.rs +1 −1 Original line number Diff line number Diff line Loading @@ -559,7 +559,7 @@ impl BluetoothProperty { // Do an unsafe cast to binding:: type and assign the values // The underlying memory location is provided by |data| which will // have enough space because it uses get_len() let mut record = let record = unsafe { &mut *(data.as_mut_ptr() as *mut bindings::bt_service_record_t) }; record.uuid = sr.uuid; record.channel = sr.channel; Loading