Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / libjingle / source / talk / xmpp / pubsubtasks.cc
index bbefbe5..015708e 100644 (file)
@@ -173,9 +173,16 @@ void PubSubRequestTask::HandleResult(const XmlElement* stanza) {
   SignalResult(this, items);
 }
 
+int PubSubReceiveTask::ProcessStart() {
+  if (SignalUpdate.is_empty()) {
+    return STATE_DONE;
+  }
+  return ReceiveTask::ProcessStart();
+}
+
 bool PubSubReceiveTask::WantsStanza(const XmlElement* stanza) {
   return MatchStanzaFrom(stanza, pubsubjid_) &&
-      IsPubSubEventItemsElem(stanza, node_);
+      IsPubSubEventItemsElem(stanza, node_) && !SignalUpdate.is_empty();
 }
 
 void PubSubReceiveTask::ReceiveStanza(const XmlElement* stanza) {