#include <sys/socket.h>
#include <time.h>
#include <unistd.h>
+#include <math.h>
#include <string>
#include "acceptor.h"
ip.c_str());
return false;
}
- if (inet_pton(AF_INET6, ip.c_str(), &addr6->sin6_addr) != 1) {
- log(ERROR, "'%s' is not a valid IPv6 address");
+ string raw_ip(ip.begin() + 1, ip.end() - 1);
+ if (inet_pton(AF_INET6, raw_ip.c_str(), &addr6->sin6_addr) != 1) {
+ log(ERROR, "'%s' is not a valid IPv6 address", raw_ip.c_str());
return false;
}
} else {
stats.url = url;
stats.bytes_received = 0;
stats.data_bytes_received = 0;
+ stats.metadata_bytes_received = 0;
stats.connect_time = time(NULL);
+ stats.latency_sec = HUGE_VAL;
}
UDPInput::UDPInput(const InputProto &serialized)
}
for (size_t i = 0; i < stream_indices.size(); ++i) {
- servers->add_data(stream_indices[i], packet_buf, ret, SUITABLE_FOR_STREAM_START);
+ servers->add_data(stream_indices[i], packet_buf, ret, /*metacube_flags=*/0);
}
}
}