Changeset ffdf2e7 for protocols/jabber
- Timestamp:
- 2010-08-10T11:18:09Z (14 years ago)
- Branches:
- master
- Children:
- 72176c1
- Parents:
- f32c14c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
rf32c14c rffdf2e7 96 96 struct im_connection *ic = imcb_new( acc ); 97 97 struct jabber_data *jd = g_new0( struct jabber_data, 1 ); 98 struct ns_srv_reply * srv = NULL;98 struct ns_srv_reply **srvl = NULL, *srv; 99 99 char *connect_to, *s; 100 100 int i; … … 196 196 if( acc->server && *acc->server ) 197 197 connect_to = acc->server; 198 else if( ( srv = srv_lookup( "xmpp-client", "tcp", jd->server ) ) || 199 ( srv = srv_lookup( "jabber-client", "tcp", jd->server ) ) ) 198 else if( ( srvl = srv_lookup( "xmpp-client", "tcp", jd->server ) ) || 199 ( srvl = srv_lookup( "jabber-client", "tcp", jd->server ) ) ) 200 { 201 /* Find the lowest-priority one. These usually come 202 back in random/shuffled order. Not looking at 203 weights etc for now. */ 204 srv = *srvl; 205 for( i = 1; srvl[i]; i ++ ) 206 if( srvl[i]->prio < srv->prio ) 207 srv = srvl[i]; 208 200 209 connect_to = srv->name; 210 } 201 211 else 202 212 connect_to = jd->server; … … 227 237 jd->fd = proxy_connect( connect_to, srv ? srv->port : set_getint( &acc->set, "port" ), jabber_connected_plain, ic ); 228 238 } 229 g_free( srv);239 srv_free( srvl ); 230 240 231 241 if( jd->fd == -1 )
Note: See TracChangeset
for help on using the changeset viewer.