comparison 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
comparison
equal deleted inserted replaced
8982:a4fd6666bb83 8983:460d02fe03df
388 return 0; 388 return 0;
389 } 389 }
390 390
391 /** 391 /**
392 * Get the screen name of the peer of a direct connection. 392 * Get the screen name of the peer of a direct connection.
393 * 393 *
394 * @param conn The ODC connection. 394 * @param conn The ODC connection.
395 * @return The screen name of the dude, or NULL if there was an anomaly. 395 * @return The screen name of the dude, or NULL if there was an anomaly.
396 */ 396 */
397 faim_export const char *aim_odc_getsn(aim_conn_t *conn) 397 faim_export const char *aim_odc_getsn(aim_conn_t *conn)
398 { 398 {
399 struct aim_odc_intdata *intdata; 399 struct aim_odc_intdata *intdata;
400 400
401 if (!conn || !conn->internal) 401 if (!conn || !conn->internal)
402 return NULL; 402 return NULL;
403 403
404 if ((conn->type != AIM_CONN_TYPE_RENDEZVOUS) || 404 if ((conn->type != AIM_CONN_TYPE_RENDEZVOUS) ||
405 (conn->subtype != AIM_CONN_SUBTYPE_OFT_DIRECTIM)) 405 (conn->subtype != AIM_CONN_SUBTYPE_OFT_DIRECTIM))
406 return NULL; 406 return NULL;
407 407
408 intdata = (struct aim_odc_intdata *)conn->internal; 408 intdata = (struct aim_odc_intdata *)conn->internal;
409 409
410 return intdata->sn; 410 return intdata->sn;
411 }
412
413 /**
414 * Get the cookie of a direct connection.
415 *
416 * @param conn The ODC connection.
417 * @return The cookie, an 8 byte unterminated string, or NULL if there was an anomaly.
418 */
419 faim_export const char *aim_odc_getcookie(aim_conn_t *conn)
420 {
421 struct aim_odc_intdata *intdata;
422
423 if (!conn || !conn->internal)
424 return NULL;
425
426 if ((conn->type != AIM_CONN_TYPE_RENDEZVOUS) ||
427 (conn->subtype != AIM_CONN_SUBTYPE_OFT_DIRECTIM))
428 return NULL;
429
430 intdata = (struct aim_odc_intdata *)conn->internal;
431
432 return intdata->cookie;
411 } 433 }
412 434
413 /** 435 /**
414 * Find the conn of a direct connection with the given buddy. 436 * Find the conn of a direct connection with the given buddy.
415 * 437 *