Mercurial > pidgin
comparison src/ft.c @ 6242:f0b0c5bca588
[gaim-migrate @ 6736]
File transfers should now have the local IP set to either the account's
public IP or the globally set local IP, if either exist.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sun, 20 Jul 2003 05:11:14 +0000 |
| parents | 9ce44a7f9ae7 |
| children | 3565ee7a5dd3 |
comparison
equal
deleted
inserted
replaced
| 6241:9ce44a7f9ae7 | 6242:f0b0c5bca588 |
|---|---|
| 29 static GaimXferUiOps *xfer_ui_ops = NULL; | 29 static GaimXferUiOps *xfer_ui_ops = NULL; |
| 30 | 30 |
| 31 GaimXfer * | 31 GaimXfer * |
| 32 gaim_xfer_new(GaimAccount *account, GaimXferType type, const char *who) | 32 gaim_xfer_new(GaimAccount *account, GaimXferType type, const char *who) |
| 33 { | 33 { |
| 34 const char *ip; | |
| 34 GaimXfer *xfer; | 35 GaimXfer *xfer; |
| 35 GaimXferUiOps *ui_ops; | 36 GaimXferUiOps *ui_ops; |
| 36 | 37 |
| 37 g_return_val_if_fail(type != GAIM_XFER_UNKNOWN, NULL); | 38 g_return_val_if_fail(type != GAIM_XFER_UNKNOWN, NULL); |
| 38 g_return_val_if_fail(account != NULL, NULL); | 39 g_return_val_if_fail(account != NULL, NULL); |
| 42 | 43 |
| 43 xfer->type = type; | 44 xfer->type = type; |
| 44 xfer->account = account; | 45 xfer->account = account; |
| 45 xfer->who = g_strdup(who); | 46 xfer->who = g_strdup(who); |
| 46 xfer->ui_ops = gaim_get_xfer_ui_ops(); | 47 xfer->ui_ops = gaim_get_xfer_ui_ops(); |
| 48 | |
| 49 if ((ip = gaim_account_get_public_ip(account)) != NULL) | |
| 50 ip = gaim_prefs_get_string("/core/ft/public_ip"); | |
| 51 | |
| 52 if (ip != NULL && *ip != '\0') | |
| 53 xfer->local_ip = g_strdup(ip); | |
| 47 | 54 |
| 48 ui_ops = gaim_xfer_get_ui_ops(xfer); | 55 ui_ops = gaim_xfer_get_ui_ops(xfer); |
| 49 | 56 |
| 50 if (ui_ops != NULL && ui_ops->new_xfer != NULL) | 57 if (ui_ops != NULL && ui_ops->new_xfer != NULL) |
| 51 ui_ops->new_xfer(xfer); | 58 ui_ops->new_xfer(xfer); |
