Mercurial > pidgin
diff 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 |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Mon Jul 05 19:33:48 2004 +0000 +++ b/src/protocols/oscar/oscar.c Tue Jul 06 05:37:16 2004 +0000 @@ -1309,7 +1309,8 @@ listenfd = gaim_network_listen_range(5190, 5199); ip = gaim_network_get_my_ip(od->conn ? od->conn->fd : -1); - dim->conn = aim_odc_initiate(od->sess, who, listenfd, gaim_network_ip_atoi(ip), gaim_network_get_port_from_fd(listenfd), cookie); + if (listenfd >= 0) + dim->conn = aim_odc_initiate(od->sess, who, listenfd, gaim_network_ip_atoi(ip), gaim_network_get_port_from_fd(listenfd), cookie); if (dim->conn != NULL) { char *tmp; GaimConversation *conv;