| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 } | 817 } |
| 818 | 818 |
| 819 // We will do a keep-alive regardless of whether this request suceeds. | 819 // We will do a keep-alive regardless of whether this request suceeds. |
| 820 // This should have almost no impact on network usage. | 820 // This should have almost no impact on network usage. |
| 821 entry_->ScheduleKeepAlive(); | 821 entry_->ScheduleKeepAlive(); |
| 822 } | 822 } |
| 823 | 823 |
| 824 void AllocateRequest::OnErrorResponse(StunMessage* response) { | 824 void AllocateRequest::OnErrorResponse(StunMessage* response) { |
| 825 const StunErrorCodeAttribute* attr = response->GetErrorCode(); | 825 const StunErrorCodeAttribute* attr = response->GetErrorCode(); |
| 826 if (!attr) { | 826 if (!attr) { |
| 827 LOG(INFO) << "Bad allocate response error code"; | 827 LOG(LS_ERROR) << "Missing allocate response error code."; |
| 828 } else { | 828 } else { |
| 829 LOG(INFO) << "Allocate error response:" | 829 LOG(INFO) << "Allocate error response:" |
| 830 << " code=" << attr->code() | 830 << " code=" << attr->code() |
| 831 << " reason='" << attr->reason() << "'"; | 831 << " reason='" << attr->reason() << "'"; |
| 832 } | 832 } |
| 833 | 833 |
| 834 if (rtc::TimeMillis() - start_time_ <= kRetryTimeout) | 834 if (rtc::TimeMillis() - start_time_ <= kRetryTimeout) |
| 835 entry_->ScheduleKeepAlive(); | 835 entry_->ScheduleKeepAlive(); |
| 836 } | 836 } |
| 837 | 837 |
| 838 void AllocateRequest::OnTimeout() { | 838 void AllocateRequest::OnTimeout() { |
| 839 LOG(INFO) << "Allocate request timed out"; | 839 LOG(INFO) << "Allocate request timed out"; |
| 840 entry_->HandleConnectFailure(connection_->socket()); | 840 entry_->HandleConnectFailure(connection_->socket()); |
| 841 } | 841 } |
| 842 | 842 |
| 843 } // namespace cricket | 843 } // namespace cricket |
| OLD | NEW |