comparison libpurple/protocols/jabber/disco.c @ 26539:20743d9bd62d

Fix allowing gmail user to initiate voice call by advertising a specific ext From xep-0115 v1.3: "The names of the feature bundles MUST NOT be used for semantic purposes: they are merely opaque identifiers that will be used in other use cases."
author Paul Aurich <paul@darkrain42.org>
date Sat, 04 Apr 2009 17:01:59 +0000
parents 1ecbda91458a
children bc7fac8e2f79
comparison
equal deleted inserted replaced
26538:a9d5067ad6e7 26539:20743d9bd62d
146 if (!feat->is_enabled || feat->is_enabled(js, feat->namespace)) { 146 if (!feat->is_enabled || feat->is_enabled(js, feat->namespace)) {
147 feature = xmlnode_new_child(query, "feature"); 147 feature = xmlnode_new_child(query, "feature");
148 xmlnode_set_attrib(feature, "var", feat->namespace); 148 xmlnode_set_attrib(feature, "var", feat->namespace);
149 } 149 }
150 } 150 }
151 #ifdef USE_VV
152 } else if (g_str_equal(node, CAPS0115_NODE "#" "voice-v1")) {
153 /*
154 * HUGE HACK! We advertise this ext (see jabber_presence_create_js
155 * where we add <c/> to the <presence/>) for the Google Talk
156 * clients that don't actually check disco#info features.
157 *
158 * This specific feature is redundant but is what
159 * node='http://mail.google.com/xmpp/client/caps', ver='1.1'
160 * advertises as 'voice-v1'.
161 */
162 xmlnode *feature = xmlnode_new_child(query, "feature");
163 xmlnode_set_attrib(feature, "var", "http://www.google.com/xmpp/protocol/voice/v1");
164 #endif
151 } else { 165 } else {
152 xmlnode *error, *inf; 166 xmlnode *error, *inf;
153 167
154 /* XXX: gross hack, implement jabber_iq_set_type or something */ 168 /* XXX: gross hack, implement jabber_iq_set_type or something */
155 xmlnode_set_attrib(iq->node, "type", "error"); 169 xmlnode_set_attrib(iq->node, "type", "error");