Update main.cpp

This commit is contained in:
Igor Zhukov 2020-03-10 16:37:39 +04:00 committed by GitHub
parent f692ea1ad7
commit f979dc3dcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,7 +167,11 @@ void init(int argc, char **argv) {
char buf[16]; char buf[16];
if (sscanf(argv[1], "%15[0-9.]:%hu", buf, &ep.port) != 2) if (sscanf(argv[1], "%15[0-9.]:%hu", buf, &ep.port) != 2)
throw std::invalid_argument(std::string("Incorrect reflector address: ") + argv[1]); throw std::invalid_argument(std::string("Incorrect reflector address: ") + argv[1]);
ep.host = buf; TgVoipEdpointHost host = {
.ipv4 = std::string(buf),
.ipv6 = std::string(),
};
ep.host = host;
int len; int len;
sscanf(argv[2], "%*32[0-9a-f]%n", &len); sscanf(argv[2], "%*32[0-9a-f]%n", &len);
@ -333,7 +337,7 @@ void stop() {
if (recorded) { if (recorded) {
std::cout << finalState.debugLog << std::endl; std::cout << finalState.debugLog << std::endl;
std::cout << "TIMESTAMPS: " << init_ts << "," std::cout << "TIMESTAMPS: " << init_ts << ","
<< fircdst_read_ts << "," << last_read_ts << "," << first_read_ts << "," << last_read_ts << ","
<< first_write_ts << "," << last_write_ts << std::endl; << first_write_ts << "," << last_write_ts << std::endl;
} }
} }