Changeset 8e6c732
- Timestamp:
- 2006-09-26T13:12:11Z (18 years ago)
- Branches:
- master
- Children:
- 022df46
- Parents:
- 281859e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/iq.c
r281859e r8e6c732 111 111 else if( strcmp( type, "result" ) == 0 && orig ) 112 112 { 113 struct xt_node * node;113 struct xt_node *c; 114 114 115 115 if( !( jd->flags & JFLAG_AUTHENTICATED ) && 116 ( node= xt_find_node( orig->children, "query" ) ) &&117 ( node = xt_find_node( node->children, "username" ) ) &&118 node->text_len )116 ( c = xt_find_node( orig->children, "query" ) ) && 117 ( c = xt_find_node( c->children, "username" ) ) && 118 c->text_len ) 119 119 { 120 120 /* This happens when we just successfully authenticated … … 124 124 return XT_ABORT; 125 125 } 126 else if( ( node = xt_find_node( orig->children, "bind" ) ) || 127 ( node = xt_find_node( orig->children, "session" ) ) ) 128 { 129 if( strcmp( node->name, "bind" ) == 0 ) 126 /* Tricky: Look for <bind> in the reply, because the server 127 should confirm the chosen resource string there. For 128 <session>, however, look in the cache, because the server 129 will probably not include it in its reply. */ 130 else if( ( c = xt_find_node( node->children, "bind" ) ) || 131 ( c = xt_find_node( orig->children, "session" ) ) ) 132 { 133 if( strcmp( c->name, "bind" ) == 0 ) 134 { 135 c = xt_find_node( c->children, "jid" ); 136 if( c && c->text_len && ( s = strchr( c->text, '/' ) ) && 137 strcmp( s + 1, set_getstr( &gc->acc->set, "resource" ) ) != 0 ) 138 serv_got_crap( gc, "Server changed session resource string to `%s'", s + 1 ); 139 130 140 jd->flags &= ~JFLAG_WAIT_BIND; 131 else if( strcmp( node->name, "session" ) == 0 ) 141 } 142 else if( strcmp( c->name, "session" ) == 0 ) 132 143 jd->flags &= ~JFLAG_WAIT_SESSION; 133 144
Note: See TracChangeset
for help on using the changeset viewer.