Mercurial > pidgin.yaz
comparison src/protocols/oscar/oscar.c @ 9455:5b4b3fb286b0
[gaim-migrate @ 10279]
This makes us check that we have a valid fd in oscar before trying to
see what port it is on, so we don't fail g_return's and spew warnings.
This also fixes a bug I think KingAnt caused in network.c, which was making
gaim_network_do_listen() return -1 for me.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Tue, 06 Jul 2004 05:37:16 +0000 |
parents | 379f59c5b1ff |
children | 9a654ab734fe |
comparison
equal
deleted
inserted
replaced
9454:b6feee45f33d | 9455:5b4b3fb286b0 |
---|---|
1307 dim->gc = gc; | 1307 dim->gc = gc; |
1308 g_snprintf(dim->name, sizeof dim->name, "%s", who); | 1308 g_snprintf(dim->name, sizeof dim->name, "%s", who); |
1309 | 1309 |
1310 listenfd = gaim_network_listen_range(5190, 5199); | 1310 listenfd = gaim_network_listen_range(5190, 5199); |
1311 ip = gaim_network_get_my_ip(od->conn ? od->conn->fd : -1); | 1311 ip = gaim_network_get_my_ip(od->conn ? od->conn->fd : -1); |
1312 dim->conn = aim_odc_initiate(od->sess, who, listenfd, gaim_network_ip_atoi(ip), gaim_network_get_port_from_fd(listenfd), cookie); | 1312 if (listenfd >= 0) |
1313 dim->conn = aim_odc_initiate(od->sess, who, listenfd, gaim_network_ip_atoi(ip), gaim_network_get_port_from_fd(listenfd), cookie); | |
1313 if (dim->conn != NULL) { | 1314 if (dim->conn != NULL) { |
1314 char *tmp; | 1315 char *tmp; |
1315 GaimConversation *conv; | 1316 GaimConversation *conv; |
1316 | 1317 |
1317 od->direct_ims = g_slist_append(od->direct_ims, dim); | 1318 od->direct_ims = g_slist_append(od->direct_ims, dim); |