Mercurial > pidgin.yaz
comparison src/protocols/jabber/jabber.c @ 2300:d2686f757d6e
[gaim-migrate @ 2310]
neat things.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 17 Sep 2001 21:30:47 +0000 |
parents | 38e156136896 |
children | f5bf315e6104 |
comparison
equal
deleted
inserted
replaced
2299:b5b7dece5249 | 2300:d2686f757d6e |
---|---|
422 } | 422 } |
423 | 423 |
424 jd = gc->proto_data; | 424 jd = gc->proto_data; |
425 j = jd->jc; | 425 j = jd->jc; |
426 | 426 |
427 if (j->fd != source) | |
428 j->fd = source; | |
429 | |
427 if (source == -1) { | 430 if (source == -1) { |
428 STATE_EVT(JCONN_STATE_OFF) | 431 STATE_EVT(JCONN_STATE_OFF) |
429 return; | 432 return; |
430 } | 433 } |
431 | |
432 if (j->fd != source) | |
433 j->fd = source; | |
434 | 434 |
435 j->state = JCONN_STATE_CONNECTED; | 435 j->state = JCONN_STATE_CONNECTED; |
436 STATE_EVT(JCONN_STATE_CONNECTED) | 436 STATE_EVT(JCONN_STATE_CONNECTED) |
437 | 437 |
438 /* start stream */ | 438 /* start stream */ |
1214 static void jabber_close(struct gaim_connection *gc) | 1214 static void jabber_close(struct gaim_connection *gc) |
1215 { | 1215 { |
1216 struct jabber_data *jd = gc->proto_data; | 1216 struct jabber_data *jd = gc->proto_data; |
1217 g_hash_table_foreach_remove(jd->hash, jabber_destroy_hash, NULL); | 1217 g_hash_table_foreach_remove(jd->hash, jabber_destroy_hash, NULL); |
1218 g_hash_table_destroy(jd->hash); | 1218 g_hash_table_destroy(jd->hash); |
1219 gaim_input_remove(gc->inpa); | 1219 if (gc->inpa) |
1220 gaim_input_remove(gc->inpa); | |
1220 close(jd->jc->fd); | 1221 close(jd->jc->fd); |
1221 g_timeout_add(50, jabber_free, jd->jc); | 1222 g_timeout_add(50, jabber_free, jd->jc); |
1222 jd->jc = NULL; | 1223 jd->jc = NULL; |
1223 g_free(jd); | 1224 g_free(jd); |
1224 gc->proto_data = NULL; | 1225 gc->proto_data = NULL; |