From d23dbd1db8ff79331ea46aaafd5fde2d6df68d84 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 25 Apr 2022 18:30:43 +0800 Subject: [PATCH] add an explicit test of the unsub path normally you would never use this, this would cause the connection manager to muck up. --- services/shellchat/src/cmds/net_cmd.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/shellchat/src/cmds/net_cmd.rs b/services/shellchat/src/cmds/net_cmd.rs index 278566152..83d451522 100644 --- a/services/shellchat/src/cmds/net_cmd.rs +++ b/services/shellchat/src/cmds/net_cmd.rs @@ -62,6 +62,12 @@ impl<'a> ShellCmdApi<'a> for NetCmd { if let Some(sub_cmd) = tokens.next() { match sub_cmd { + "unsub" => { + match env.netmgr.wifi_state_unsubscribe() { + Ok(_) => write!(ret, "wifi state successful"), + Err(e) => write!(ret, "wifi unsub error: {:?}", e), + }; + } "tcpget" => { // note: to keep shellchat lightweight, we do a very minimal parsing of the URL. We assume it always has // a form such as: