comparison src/protocols/oscar/oscar.c @ 10594:a78d9fac8183

[gaim-migrate @ 12009] Forward-port this from oldstatus committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 14 Feb 2005 03:02:36 +0000
parents 0f7452b1f777
children de34037a02c7
comparison
equal deleted inserted replaced
10593:ffabeb0fdc64 10594:a78d9fac8183
3574 return 1; 3574 return 1;
3575 } 3575 }
3576 3576
3577 gaim_debug_info("oscar", 3577 gaim_debug_info("oscar",
3578 "%s received direct im request from %s (%s)\n", 3578 "%s received direct im request from %s (%s)\n",
3579 username, userinfo->sn, args->clientip); 3579 username, userinfo->sn, args->verifiedip);
3580 3580
3581 d->gc = gc; 3581 d->gc = gc;
3582 d->sn = g_strdup(userinfo->sn); 3582 d->sn = g_strdup(userinfo->sn);
3583 /* Let's use the clientip here, because I think that's what AIM does. 3583 /* Let's use the clientip here, because I think that's what AIM does.
3584 * Besides, if the clientip is wrong, we'll probably timeout faster, 3584 * Besides, if the clientip is wrong, we'll probably timeout faster,
3585 * and then ask them to connect to us. */ 3585 * and then ask them to connect to us. */
3586 snprintf(d->ip, sizeof(d->ip), "%s:%d", args->clientip, args->port?args->port:5190); 3586 /*
3587 * I disagree, let's use the verifiedip. I think AIM tries the
3588 * verified IP first, then tries the client IP if that fails. In
3589 * any case, there's a better chance the verified IP will be correct.
3590 * The client IP is what the other person _thinks_ their IP address
3591 * is. The verified IP is the address that the AIM server sees the
3592 * other person using.
3593 */
3594 snprintf(d->ip, sizeof(d->ip), "%s:%d", args->verifiedip, args->port?args->port:5190);
3587 memcpy(d->cookie, args->cookie, 8); 3595 memcpy(d->cookie, args->cookie, 8);
3588 if (dim && !dim->connected && aim_odc_getcookie(dim->conn) && args->cookie && 3596 if (dim && !dim->connected && aim_odc_getcookie(dim->conn) && args->cookie &&
3589 (!memcmp(aim_odc_getcookie(dim->conn), args->cookie, 8))) { 3597 (!memcmp(aim_odc_getcookie(dim->conn), args->cookie, 8))) {
3590 3598
3591 oscar_direct_im_destroy(od, dim); 3599 oscar_direct_im_destroy(od, dim);