src/protocols/jabber/jabber.c

changeset 14043
3b7f131dbb20
parent 14030
23144f1dc950
child 14062
dd8d7eb8fa76
equal deleted inserted replaced
14042:71aaaf85aead 14043:3b7f131dbb20
368 GaimConnection *gc = data; 368 GaimConnection *gc = data;
369 JabberStream *js = gc->proto_data; 369 JabberStream *js = gc->proto_data;
370 int len; 370 int len;
371 static char buf[4096]; 371 static char buf[4096];
372 372
373 if(!g_list_find(gaim_connections_get_all(), gc)) 373 if(!GAIM_CONNECTION_IS_VALID(gc))
374 return; 374 return;
375 375
376 if((len = read(js->fd, buf, sizeof(buf) - 1)) > 0) { 376 if((len = read(js->fd, buf, sizeof(buf) - 1)) > 0) {
377 #ifdef HAVE_CYRUS_SASL 377 #ifdef HAVE_CYRUS_SASL
378 if (js->sasl_maxbuf>0) { 378 if (js->sasl_maxbuf>0) {
484 { 484 {
485 GaimConnection *gc; 485 GaimConnection *gc;
486 JabberStream *js; 486 JabberStream *js;
487 487
488 gc = data; 488 gc = data;
489 if (!g_list_find(gaim_connections_get_all(), gc)) 489 if (!GAIM_CONNECTION_IS_VALID(gc))
490 { 490 {
491 /* This connection has been closed */ 491 /* This connection has been closed */
492 g_free(resp); 492 g_free(resp);
493 return; 493 return;
494 } 494 }
498 if(results) { 498 if(results) {
499 jabber_login_connect(js, resp->hostname, resp->port); 499 jabber_login_connect(js, resp->hostname, resp->port);
500 g_free(resp); 500 g_free(resp);
501 } else { 501 } else {
502 jabber_login_connect(js, js->user->domain, 502 jabber_login_connect(js, js->user->domain,
503 gaim_account_get_int(js->gc->account, "port", 0)); 503 gaim_account_get_int(js->gc->account, "port", 5222));
504 } 504 }
505 } 505 }
506 506
507 507
508 508

mercurial