Skip to content

Commit 04206af

Browse files
committed
Update Windows netremote-server exe.
1 parent 9340f58 commit 04206af

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

src/common/wifi/core/AccessPoint.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ AccessPoint::GetInterfaceName() const noexcept
1919
std::unique_ptr<IAccessPointController>
2020
AccessPoint::CreateController()
2121
{
22-
return m_accessPointControllerFactory->Create(m_interfaceName);
22+
return (m_accessPointControllerFactory != nullptr)
23+
? m_accessPointControllerFactory->Create(m_interfaceName)
24+
: nullptr;
2325
}
2426

2527
AccessPointFactory::AccessPointFactory(std::shared_ptr<IAccessPointControllerFactory> accessPointControllerFactory) :

src/windows/server/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_sources(${PROJECT_NAME}-server-windows
99
target_link_libraries(${PROJECT_NAME}-server-windows
1010
PRIVATE
1111
${PROJECT_NAME}-server
12+
wifi-apmanager
1213
)
1314

1415
set_target_properties(${PROJECT_NAME}-server-windows

src/windows/server/Main.cxx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11

22
#include <format>
33
#include <iostream>
4+
#include <memory>
45

56
#include <microsoft/net/remote/NetRemoteServer.hxx>
67
#include <microsoft/net/remote/NetRemoteServerConfiguration.hxx>
8+
#include <microsoft/net/wifi/AccessPoint.hxx>
9+
#include <microsoft/net/wifi/AccessPointManager.hxx>
710

811
using namespace Microsoft::Net::Remote;
12+
using namespace Microsoft::Net::Wifi;
913

1014
int
1115
main(int argc, char* argv[])
1216
{
13-
const auto configuration = NetRemoteServerConfiguration::FromCommandLineArguments(argc, argv);
17+
auto configuration = NetRemoteServerConfiguration::FromCommandLineArguments(argc, argv);
18+
{
19+
auto accessPointFactory = std::make_unique<AccessPointFactory>(nullptr);
20+
auto accessPointManager = AccessPointManager::Create(std::move(accessPointFactory));
21+
configuration.AccessPointManager = accessPointManager;
22+
}
1423

15-
NetRemoteServer server{ configuration.ServerAddress };
24+
NetRemoteServer server{ std::move(configuration) };
1625
server.Run();
1726
server.GetGrpcServer()->Wait();
1827

0 commit comments

Comments
 (0)