mirror of
https://github.com/google/cdc-file-transfer.git
synced 2026-09-13 18:04:30 +03:00
Remove port manager and range parser
That code is no longer needed since both cdc_stream and cdc_rsync use ephemeral ports assigned by the OS now.
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/str_split.h"
|
||||
#include "absl_helper/jedec_size_flag.h"
|
||||
#include "common/port_range_parser.h"
|
||||
#include "lyra/lyra.hpp"
|
||||
|
||||
namespace cdc_ft {
|
||||
@@ -57,18 +56,6 @@ std::function<void(const std::string&)> BaseCommand::JedecParser(
|
||||
};
|
||||
}
|
||||
|
||||
std::function<void(const std::string&)> BaseCommand::PortRangeParser(
|
||||
const char* flag_name, uint16_t* first, uint16_t* last) {
|
||||
return [flag_name, first, last,
|
||||
error = &parse_error_](const std::string& value) {
|
||||
if (!port_range::Parse(value.c_str(), first, last)) {
|
||||
*error = absl::StrFormat(
|
||||
"Failed to parse %s=%s, expected <port> or <port1>-<port2>",
|
||||
flag_name, value);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
std::function<void(const std::string&)> BaseCommand::PosArgValidator(
|
||||
std::string* str) {
|
||||
return [str, invalid_arg = &invalid_arg_](const std::string& value) {
|
||||
|
||||
Reference in New Issue
Block a user