comparison src/protocols/jabber/si.c @ 8135:8f4ce853e685

[gaim-migrate @ 8840] created a convenience function, and used it. a lot. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 17 Jan 2004 19:36:29 +0000
parents b250288fa948
children f50c059b6384
comparison
equal deleted inserted replaced
8134:ea3eb461efc0 8135:8f4ce853e685
80 jsx = xfer->data; 80 jsx = xfer->data;
81 81
82 if(!(feature = xmlnode_get_child(si, "feature"))) 82 if(!(feature = xmlnode_get_child(si, "feature")))
83 return; 83 return;
84 84
85 for(x = feature->child; x; x = x->next) { 85 for(x = xmlnode_get_child(feature, "x"); x; x = xmlnode_get_next_twin(x)) {
86 const char *xmlns; 86 const char *xmlns;
87 if(x->type != NODE_TYPE_TAG)
88 continue;
89 if(!(xmlns = xmlnode_get_attrib(x, "xmlns"))) 87 if(!(xmlns = xmlnode_get_attrib(x, "xmlns")))
90 continue; 88 continue;
91 if(strcmp(xmlns, "jabber:x:data")) 89 if(strcmp(xmlns, "jabber:x:data"))
92 continue; 90 continue;
93 for(field = x->child; field; field = field->next) { 91 for(field = xmlnode_get_child(x, "field"); field;
92 field = xmlnode_get_next_twin(field)) {
94 const char *var; 93 const char *var;
95 if(field->type != NODE_TYPE_TAG)
96 continue;
97 if(!(var = xmlnode_get_attrib(field, "var"))) 94 if(!(var = xmlnode_get_attrib(field, "var")))
98 continue; 95 continue;
99 if(!strcmp(var, "stream-method")) { 96 if(!strcmp(var, "stream-method")) {
100 if((value = xmlnode_get_child(field, "value"))) { 97 if((value = xmlnode_get_child(field, "value"))) {
101 char *val_data = xmlnode_get_data(value); 98 char *val_data = xmlnode_get_data(value);