| 259 xmlnode_insert_data(pri, pstr, -1); |
259 xmlnode_insert_data(pri, pstr, -1); |
| 260 g_free(pstr); |
260 g_free(pstr); |
| 261 } |
261 } |
| 262 |
262 |
| 263 /* JEP-0115 */ |
263 /* JEP-0115 */ |
| |
264 /* calculate hash */ |
| |
265 jabber_caps_calculate_own_hash(js); |
| |
266 /* create xml */ |
| 264 c = xmlnode_new_child(presence, "c"); |
267 c = xmlnode_new_child(presence, "c"); |
| 265 xmlnode_set_namespace(c, "http://jabber.org/protocol/caps"); |
268 xmlnode_set_namespace(c, "http://jabber.org/protocol/caps"); |
| 266 xmlnode_set_attrib(c, "node", CAPS0115_NODE); |
269 xmlnode_set_attrib(c, "node", CAPS0115_NODE); |
| 267 xmlnode_set_attrib(c, "hash", "sha-1"); |
270 xmlnode_set_attrib(c, "hash", "sha-1"); |
| 268 xmlnode_set_attrib(c, "ver", jabber_caps_get_own_hash()); |
271 xmlnode_set_attrib(c, "ver", jabber_caps_get_own_hash()); |