changeset 1644:73fc85ea0b4b

Do not send disco requests to offline resources
author Mikael Berthe <mikael@lilotux.net>
date Tue, 03 Nov 2009 22:38:02 +0100
parents 8c0e173d7d6a
children d3cd4db23f55
files mcabber/src/xmpp.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/xmpp.c	Tue Nov 03 22:16:22 2009 +0100
+++ b/mcabber/src/xmpp.c	Tue Nov 03 22:38:02 2009 +0100
@@ -1278,7 +1278,7 @@
   time_t timestamp = 0L;
   LmMessageNode *muc_packet, *caps;
 
-  //Check for MUC presence packet
+  // Check for MUC presence packet
   muc_packet = lm_message_node_find_xmlns
           (m->node, "http://jabber.org/protocol/muc#user");
 
@@ -1359,14 +1359,14 @@
                     ustmsg);
   }
 
-  //XEP-0115 Entity Capabilities
+  // XEP-0115 Entity Capabilities
   caps = lm_message_node_find_xmlns(m->node, NS_CAPS);
-  if (caps) {
+  if (caps && ust != offline) {
     const char *ver = lm_message_node_get_attribute(caps, "ver");
     GSList *sl_buddy = NULL;
     if (rname)
       sl_buddy = roster_find(r, jidsearch, ROSTER_TYPE_USER);
-    //only cache the caps if the user is on the roster
+    // Only cache the caps if the user is on the roster
     if (sl_buddy && buddy_getonserverflag(sl_buddy->data)) {
       buddy_resource_setcaps(sl_buddy->data, rname, ver);