# HG changeset patch # User Mark Doliner # Date 1108350156 0 # Node ID a78d9fac818306d50a2acd76de191c48dcdf8e1c # Parent ffabeb0fdc64797918d19598361d23586536b217 [gaim-migrate @ 12009] Forward-port this from oldstatus committer: Tailor Script diff -r ffabeb0fdc64 -r a78d9fac8183 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Sun Feb 13 19:12:36 2005 +0000 +++ b/src/protocols/oscar/oscar.c Mon Feb 14 03:02:36 2005 +0000 @@ -3576,14 +3576,22 @@ gaim_debug_info("oscar", "%s received direct im request from %s (%s)\n", - username, userinfo->sn, args->clientip); + username, userinfo->sn, args->verifiedip); d->gc = gc; d->sn = g_strdup(userinfo->sn); /* Let's use the clientip here, because I think that's what AIM does. * Besides, if the clientip is wrong, we'll probably timeout faster, * and then ask them to connect to us. */ - snprintf(d->ip, sizeof(d->ip), "%s:%d", args->clientip, args->port?args->port:5190); + /* + * I disagree, let's use the verifiedip. I think AIM tries the + * verified IP first, then tries the client IP if that fails. In + * any case, there's a better chance the verified IP will be correct. + * The client IP is what the other person _thinks_ their IP address + * is. The verified IP is the address that the AIM server sees the + * other person using. + */ + snprintf(d->ip, sizeof(d->ip), "%s:%d", args->verifiedip, args->port?args->port:5190); memcpy(d->cookie, args->cookie, 8); if (dim && !dim->connected && aim_odc_getcookie(dim->conn) && args->cookie && (!memcmp(aim_odc_getcookie(dim->conn), args->cookie, 8))) {