Mercurial > pidgin
diff src/protocols/oscar/ft.c @ 8983:460d02fe03df
[gaim-migrate @ 9758]
This makes us tell the other person to connect to us if we can't connect
to them, for direct im. Also I made us used the clientip instead of the
verified ip for direct im, because I get the impression that's what the
official aim clients use, and I think it sort of makes sense.
Maybe I should compare the two and not bother trying if they're different.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Thu, 20 May 2004 02:03:34 +0000 |
parents | a4fd6666bb83 |
children | f13172eed3ad |
line wrap: on
line diff
--- a/src/protocols/oscar/ft.c Thu May 20 00:14:14 2004 +0000 +++ b/src/protocols/oscar/ft.c Thu May 20 02:03:34 2004 +0000 @@ -390,7 +390,7 @@ /** * Get the screen name of the peer of a direct connection. - * + * * @param conn The ODC connection. * @return The screen name of the dude, or NULL if there was an anomaly. */ @@ -401,7 +401,7 @@ if (!conn || !conn->internal) return NULL; - if ((conn->type != AIM_CONN_TYPE_RENDEZVOUS) || + if ((conn->type != AIM_CONN_TYPE_RENDEZVOUS) || (conn->subtype != AIM_CONN_SUBTYPE_OFT_DIRECTIM)) return NULL; @@ -411,6 +411,28 @@ } /** + * Get the cookie of a direct connection. + * + * @param conn The ODC connection. + * @return The cookie, an 8 byte unterminated string, or NULL if there was an anomaly. + */ +faim_export const char *aim_odc_getcookie(aim_conn_t *conn) +{ + struct aim_odc_intdata *intdata; + + if (!conn || !conn->internal) + return NULL; + + if ((conn->type != AIM_CONN_TYPE_RENDEZVOUS) || + (conn->subtype != AIM_CONN_SUBTYPE_OFT_DIRECTIM)) + return NULL; + + intdata = (struct aim_odc_intdata *)conn->internal; + + return intdata->cookie; +} + +/** * Find the conn of a direct connection with the given buddy. * * @param sess The session.