summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 01:50:41 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 01:50:41 +0000
commit95def6d076e66115ede482dc5926ed90a391d3d2 (patch)
tree088a50bb498b5dd0648142ffcb50a314ab3203af /remoting
parentdfe3aeae31a0f719253fd39897be5c14d0a79885 (diff)
downloadchromium_src-95def6d076e66115ede482dc5926ed90a391d3d2.zip
chromium_src-95def6d076e66115ede482dc5926ed90a391d3d2.tar.gz
chromium_src-95def6d076e66115ede482dc5926ed90a391d3d2.tar.bz2
Heartbeat error logging for chromoting.
TEST=simple_host logs error received from the bot. BUG=None Review URL: http://codereview.chromium.org/2711003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/heartbeat_sender.cc8
-rw-r--r--remoting/host/heartbeat_sender.h3
2 files changed, 10 insertions, 1 deletions
diff --git a/remoting/host/heartbeat_sender.cc b/remoting/host/heartbeat_sender.cc
index e72c5a1..10fb3aa 100644
--- a/remoting/host/heartbeat_sender.cc
+++ b/remoting/host/heartbeat_sender.cc
@@ -46,6 +46,7 @@ void HeartbeatSender::DoStart() {
DCHECK(MessageLoop::current() == jingle_client_->message_loop());
request_.reset(new IqRequest(jingle_client_));
+ request_->set_callback(NewCallback(this, &HeartbeatSender::ProcessResponse));
jingle_client_->message_loop()->PostTask(
FROM_HERE, NewRunnableMethod(this, &HeartbeatSender::DoSendStanza));
@@ -66,4 +67,11 @@ void HeartbeatSender::DoSendStanza() {
kHeartbeatPeriodMs);
}
+void HeartbeatSender::ProcessResponse(const buzz::XmlElement* response) {
+ if (response->Attr(buzz::QN_TYPE) == buzz::STR_ERROR) {
+ LOG(ERROR) << "Received error in response to heartbeat: "
+ << response->Str();
+ }
+}
+
} // namespace remoting
diff --git a/remoting/host/heartbeat_sender.h b/remoting/host/heartbeat_sender.h
index b072511..6521654 100644
--- a/remoting/host/heartbeat_sender.h
+++ b/remoting/host/heartbeat_sender.h
@@ -26,10 +26,11 @@ class HeartbeatSender : public base::RefCountedThreadSafe<HeartbeatSender> {
void Start(JingleClient* jingle_client, const std::string& host_id);
private:
-
void DoStart();
void DoSendStanza();
+ void ProcessResponse(const buzz::XmlElement* response);
+
bool started_;
JingleClient* jingle_client_;
std::string host_id_;