aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/jabber')
-rw-r--r--protocols/jabber/io.c4
-rw-r--r--protocols/jabber/jabber.c9
2 files changed, 8 insertions, 5 deletions
diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c
index 665f5322..bc08a977 100644
--- a/protocols/jabber/io.c
+++ b/protocols/jabber/io.c
@@ -101,8 +101,6 @@ static gboolean jabber_write_queue( struct gaim_connection *gc )
else
st = write( jd->fd, jd->txq, jd->tx_len );
-// if( st > 0 ) write( 1, jd->txq, st );
-
if( st == jd->tx_len )
{
/* We wrote everything, clear the buffer. */
@@ -156,8 +154,6 @@ static gboolean jabber_read_callback( gpointer data, gint fd, b_input_condition
else
st = read( jd->fd, buf, sizeof( buf ) );
-// if( st > 0 ) write( 1, buf, st );
-
if( st > 0 )
{
/* Parse. */
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index 3a2cb246..fd8b6128 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -158,6 +158,8 @@ static void jabber_login( account_t *acc )
else
connect_to = jd->server;
+ set_login_progress( gc, "Connecting" );
+
/* For non-SSL connections we can try to use the port # from the SRV
reply, but let's not do that when using SSL, SSL usually runs on
non-standard ports... */
@@ -170,8 +172,13 @@ static void jabber_login( account_t *acc )
{
jd->fd = proxy_connect( connect_to, srv ? srv->port : set_getint( &acc->set, "port" ), jabber_connected_plain, gc );
}
-
g_free( srv );
+
+ if( jd->fd == -1 )
+ {
+ hide_login_progress( gc, "Could not connect to server" );
+ signoff( gc );
+ }
}
static void jabber_close( struct gaim_connection *gc )