MCPcopy Create free account
hub / github.com/ReversecLabs/C3 / Process

Method Process

Src/ChannelLinter/ChannelLinter.cpp:100–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 }
99
100 void ChannelLinter::Process()
101 {
102 std::shared_ptr<MockDeviceBridge> channel;
103 if (m_Config.ShouldCreateChannel())
104 {
105 std::cout << "Creating channel ... " << std::flush;
106 channel = MakeChannel(*m_Config.m_ChannelArguments);
107 std::cout << "OK" << std::endl;
108 }
109
110 if (m_Config.m_TestChannelIO)
111 {
112 assert(channel); // First channel should already be created
113 std::cout << "Creating complementary channel ... " << std::flush;
114 auto complementaryArgs = GetComplementaryChannelArgs();
115 auto complementaryChannel = MakeChannel(complementaryArgs);
116 assert(complementaryChannel);
117 std::cout << "OK" << std::endl;
118
119 TestChannelIO(*channel.get(), *complementaryChannel.get(), m_Config.m_OverlappedIO);
120 }
121
122 if (m_Config.m_Command)
123 {
124 assert(channel); // First channel should already be created
125 TestCommand(channel);
126 }
127 }
128
129 std::shared_ptr<FSecure::C3::Linter::MockDeviceBridge> ChannelLinter::MakeChannel(StringVector const& channnelArguments) const
130 {

Callers 1

mainFunction · 0.80

Calls 2

ShouldCreateChannelMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected