From 076f33f677d444d8ab7d06c06e50c26c74ddecb6 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Fri, 12 Apr 2019 14:30:51 -0700 Subject: [PATCH] RootCanal: Open network ports only if there is a console Fixes: 128355308 Test: toggle airplane mode and check for opening sockets Change-Id: I8c4581b708c05a8c72dba3604c02adea97c1653b --- test/rootcanal/bluetooth_hci.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/rootcanal/bluetooth_hci.cc b/test/rootcanal/bluetooth_hci.cc index f57f538cc..3e4297bfc 100644 --- a/test/rootcanal/bluetooth_hci.cc +++ b/test/rootcanal/bluetooth_hci.cc @@ -122,9 +122,11 @@ Return BluetoothHci::initialize(const sp& cb) { if (BtTestConsoleEnabled()) { SetUpTestChannel(6111); + SetUpHciServer(6211, + [this](int fd) { test_model_.IncomingHciConnection(fd); }); + SetUpLinkLayerServer( + 6311, [this](int fd) { test_model_.IncomingLinkLayerConnection(fd); }); } - SetUpHciServer(6211, [this](int fd) { test_model_.IncomingHciConnection(fd); }); - SetUpLinkLayerServer(6311, [this](int fd) { test_model_.IncomingLinkLayerConnection(fd); }); unlink_cb_ = [cb](sp& death_recipient) { if (death_recipient->getHasDied()) -- 2.11.0