Loading system/gd/rust/linux/client/src/command_handler.rs +21 −1 Original line number Diff line number Diff line Loading @@ -251,7 +251,7 @@ fn build_commands() -> HashMap<String, CommandOption> { String::from( "socket connect <address> <l2cap|rfcomm> <psm|uuid> <auth-required> <Bredr|LE>", ), String::from("socket disconnect <socket_id>"), String::from("socket close <socket_id>"), String::from("socket set-on-connect-schedule <send|resend|dump>"), ], description: String::from("Socket manager utilities."), Loading Loading @@ -1626,6 +1626,26 @@ impl CommandHandler { status, id, addr, sock_type, psm_or_uuid); } } "close" => { let sockid = String::from(get_arg(args, 1)?) .parse::<u64>() .or(Err("Failed parsing socket ID"))?; let status = self .context .lock() .unwrap() .socket_manager_dbus .as_mut() .unwrap() .close(callback_id, sockid); if status != BtStatus::Success { return Err(format!( "Failed to close the listening socket, status = {:?}", status, ) .into()); } } _ => return Err(CommandError::InvalidArgs), }; Loading Loading
system/gd/rust/linux/client/src/command_handler.rs +21 −1 Original line number Diff line number Diff line Loading @@ -251,7 +251,7 @@ fn build_commands() -> HashMap<String, CommandOption> { String::from( "socket connect <address> <l2cap|rfcomm> <psm|uuid> <auth-required> <Bredr|LE>", ), String::from("socket disconnect <socket_id>"), String::from("socket close <socket_id>"), String::from("socket set-on-connect-schedule <send|resend|dump>"), ], description: String::from("Socket manager utilities."), Loading Loading @@ -1626,6 +1626,26 @@ impl CommandHandler { status, id, addr, sock_type, psm_or_uuid); } } "close" => { let sockid = String::from(get_arg(args, 1)?) .parse::<u64>() .or(Err("Failed parsing socket ID"))?; let status = self .context .lock() .unwrap() .socket_manager_dbus .as_mut() .unwrap() .close(callback_id, sockid); if status != BtStatus::Success { return Err(format!( "Failed to close the listening socket, status = {:?}", status, ) .into()); } } _ => return Err(CommandError::InvalidArgs), }; Loading