Index: webrtc/p2p/base/relayserver.cc |
diff --git a/webrtc/p2p/base/relayserver.cc b/webrtc/p2p/base/relayserver.cc |
index e208d70d0f2902325ca1a367fb1d38a69c5ce1c1..aad0070d345a190bde89f9fbdd1b0c735491806c 100644 |
--- a/webrtc/p2p/base/relayserver.cc |
+++ b/webrtc/p2p/base/relayserver.cc |
@@ -355,11 +355,12 @@ void RelayServer::HandleStunAllocate( |
// else-branch will then disappear. |
// Compute the appropriate lifetime for this binding. |
- uint32_t lifetime = MAX_LIFETIME; |
+ int lifetime = MAX_LIFETIME; |
const StunUInt32Attribute* lifetime_attr = |
request.GetUInt32(STUN_ATTR_LIFETIME); |
if (lifetime_attr) |
- lifetime = std::min(lifetime, lifetime_attr->value() * 1000); |
+ lifetime = |
+ std::min(lifetime, static_cast<int>(lifetime_attr->value() * 1000)); |
binding = new RelayServerBinding(this, username, "0", lifetime); |
binding->SignalTimeout.connect(this, &RelayServer::OnTimeout); |
@@ -653,7 +654,7 @@ const uint32_t MSG_LIFETIME_TIMER = 1; |
RelayServerBinding::RelayServerBinding(RelayServer* server, |
const std::string& username, |
const std::string& password, |
- uint32_t lifetime) |
+ int lifetime) |
: server_(server), |
username_(username), |
password_(password), |
@@ -693,7 +694,7 @@ void RelayServerBinding::AddExternalConnection(RelayServerConnection* conn) { |
} |
void RelayServerBinding::NoteUsed() { |
- last_used_ = rtc::Time(); |
+ last_used_ = rtc::Time64(); |
} |
bool RelayServerBinding::HasMagicCookie(const char* bytes, size_t size) const { |
@@ -734,7 +735,7 @@ void RelayServerBinding::OnMessage(rtc::Message *pmsg) { |
// If the lifetime timeout has been exceeded, then send a signal. |
// Otherwise, just keep waiting. |
- if (rtc::Time() >= last_used_ + lifetime_) { |
+ if (rtc::Time64() >= last_used_ + lifetime_) { |
LOG(LS_INFO) << "Expiring binding " << username_; |
SignalTimeout(this); |
} else { |