Commit 4040f13c authored by sergeyu@chromium.org's avatar sergeyu@chromium.org

IqRequest implementations: calls the callback when response is received.

BUG=None
TEST=Chromoting host works.

Review URL: http://codereview.chromium.org/7744058

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98455 0039d316-1c4b-4281-b951-d872f2087c98
parent 2f7830b3
...@@ -57,7 +57,7 @@ void JavascriptIqRegistry::OnIncomingStanza(const buzz::XmlElement* stanza) { ...@@ -57,7 +57,7 @@ void JavascriptIqRegistry::OnIncomingStanza(const buzz::XmlElement* stanza) {
// JavascriptIqRequest::SendIq(), but remove in // JavascriptIqRequest::SendIq(), but remove in
// JavascriptIqRegistry::OnIq(). We should try to keep the // JavascriptIqRegistry::OnIq(). We should try to keep the
// registration/deregistration in one spot. // registration/deregistration in one spot.
if (it->second->callback_.is_null()) { if (!it->second->callback_.is_null()) {
it->second->callback_.Run(stanza); it->second->callback_.Run(stanza);
it->second->callback_.Reset(); it->second->callback_.Reset();
} else { } else {
......
...@@ -57,7 +57,7 @@ void XmppIqRequest::Unregister() { ...@@ -57,7 +57,7 @@ void XmppIqRequest::Unregister() {
void XmppIqRequest::IqResponse(buzz::XmppIqCookie cookie, void XmppIqRequest::IqResponse(buzz::XmppIqCookie cookie,
const buzz::XmlElement* stanza) { const buzz::XmlElement* stanza) {
if (callback_.is_null()) { if (!callback_.is_null()) {
callback_.Run(stanza); callback_.Run(stanza);
callback_.Reset(); callback_.Reset();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment