Changeset 36e9f62 for protocols/jabber
- Timestamp:
- 2006-10-07T17:46:28Z (18 years ago)
- Branches:
- master
- Children:
- 038d17f
- Parents:
- 090f1cb
- Location:
- protocols/jabber
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r090f1cb r36e9f62 59 59 struct gaim_connection *gc = new_gaim_conn( acc ); 60 60 struct jabber_data *jd = g_new0( struct jabber_data, 1 ); 61 struct ns_srv_reply *srv = NULL; 62 char *connect_to; 61 63 62 64 jd->gc = gc; … … 79 81 jd->node_cache = xt_new_node( "cache", NULL, NULL ); 80 82 83 /* Figure out the hostname to connect to. */ 84 if( acc->server ) 85 connect_to = acc->server; 86 else if( ( srv = srv_lookup( "xmpp-client", "tcp", jd->server ) ) || 87 ( srv = srv_lookup( "jabber-client", "tcp", jd->server ) ) ) 88 connect_to = srv->name; 89 else 90 connect_to = jd->server; 91 92 /* For non-SSL connections we can try to use the port # from the SRV 93 reply, but let's not do that when using SSL, SSL usually runs on 94 non-standard ports... */ 81 95 if( set_getbool( &acc->set, "ssl" ) ) 82 96 { 83 jd->ssl = ssl_connect( acc->server ? acc->server : jd->server, set_getint( &acc->set, "port" ), jabber_connected_ssl, gc );97 jd->ssl = ssl_connect( connect_to, set_getint( &acc->set, "port" ), jabber_connected_ssl, gc ); 84 98 jd->fd = ssl_getfd( jd->ssl ); 85 99 } 86 100 else 87 101 { 88 jd->fd = proxy_connect( acc->server ? acc->server : jd->server, set_getint( &acc->set, "port" ), jabber_connected_plain, gc ); 89 } 102 jd->fd = proxy_connect( connect_to, srv ? srv->port : set_getint( &acc->set, "port" ), jabber_connected_plain, gc ); 103 } 104 105 g_free( srv ); 90 106 } 91 107 -
protocols/jabber/presence.c
r090f1cb r36e9f62 38 38 *s = 0; 39 39 40 /* Will implement better parsing of away states/msgs when we 41 finally do those API changes. Which will probably be after 42 merging this module into the main tree. */ 40 43 if( type == NULL ) 41 44 serv_got_update( gc, from, 1, 0, 0, 0, 0, 0 ); … … 84 87 85 88 node = jabber_make_packet( "presence", NULL, NULL, NULL ); 89 xt_add_child( node, xt_new_node( "priority", set_getstr( &gc->acc->set, "priority" ), NULL ) ); 86 90 if( show && *show ) 87 91 xt_add_child( node, xt_new_node( "show", show, NULL ) ); 88 92 if( status ) 89 93 xt_add_child( node, xt_new_node( "status", status, NULL ) ); 90 /* if( set_getint( &gc->acc->set, "priority" ) != 0 ) */91 /* Let's just send this every time... */92 xt_add_child( node, xt_new_node( "priority", set_getstr( &gc->acc->set, "priority" ), NULL ) );93 94 94 95 st = jabber_write_packet( gc, node );
Note: See TracChangeset
for help on using the changeset viewer.