| 197 g_snprintf(buf, sizeof buf, "Looking up %s", |
197 g_snprintf(buf, sizeof buf, "Looking up %s", |
| 198 account->proto_opt[USEROPT_AUTH][0] ? account->proto_opt[USEROPT_AUTH] : TOC_HOST); |
198 account->proto_opt[USEROPT_AUTH][0] ? account->proto_opt[USEROPT_AUTH] : TOC_HOST); |
| 199 set_login_progress(gc, 1, buf); |
199 set_login_progress(gc, 1, buf); |
| 200 |
200 |
| 201 debug_printf("* Client connects to TOC\n"); |
201 debug_printf("* Client connects to TOC\n"); |
| 202 if (proxy_connect(account->proto_opt[USEROPT_AUTH][0] ? |
202 if (proxy_connect(account, account->proto_opt[USEROPT_AUTH][0] ? |
| 203 account->proto_opt[USEROPT_AUTH] : TOC_HOST, |
203 account->proto_opt[USEROPT_AUTH] : TOC_HOST, |
| 204 account->proto_opt[USEROPT_AUTHPORT][0] ? |
204 account->proto_opt[USEROPT_AUTHPORT][0] ? |
| 205 atoi(account->proto_opt[USEROPT_AUTHPORT]) : TOC_PORT, |
205 atoi(account->proto_opt[USEROPT_AUTHPORT]) : TOC_PORT, |
| 206 toc_login_callback, gc) != 0 || !account->gc) { |
206 toc_login_callback, gc) != 0 || !account->gc) { |
| 207 g_snprintf(buf, sizeof(buf), "Connect to %s failed", account->proto_opt[USEROPT_AUTH]); |
207 g_snprintf(buf, sizeof(buf), "Connect to %s failed", account->proto_opt[USEROPT_AUTH]); |
| 1698 gtk_widget_destroy(old_ft->window); |
1698 gtk_widget_destroy(old_ft->window); |
| 1699 |
1699 |
| 1700 g_snprintf(buf, sizeof(buf), "toc_rvous_accept %s %s %s", ft->user, ft->cookie, FILE_SEND_UID); |
1700 g_snprintf(buf, sizeof(buf), "toc_rvous_accept %s %s %s", ft->user, ft->cookie, FILE_SEND_UID); |
| 1701 sflap_send(ft->gc, buf, -1, TYPE_DATA); |
1701 sflap_send(ft->gc, buf, -1, TYPE_DATA); |
| 1702 |
1702 |
| 1703 if (proxy_connect(ft->ip, ft->port, toc_send_file_connect, ft) != 0) { |
1703 if (proxy_connect(account, ft->ip, ft->port, toc_send_file_connect, ft) != 0) { |
| 1704 do_error_dialog(_("Could not connect for transfer."), NULL, GAIM_ERROR); |
1704 do_error_dialog(_("Could not connect for transfer."), NULL, GAIM_ERROR); |
| 1705 g_free(ft->filename); |
1705 g_free(ft->filename); |
| 1706 g_free(ft->cookie); |
1706 g_free(ft->cookie); |
| 1707 g_free(ft->user); |
1707 g_free(ft->user); |
| 1708 g_free(ft->ip); |
1708 g_free(ft->ip); |
| 1900 gtk_widget_destroy(old_ft->window); |
1900 gtk_widget_destroy(old_ft->window); |
| 1901 |
1901 |
| 1902 g_snprintf(buf2, sizeof(buf2), "toc_rvous_accept %s %s %s", ft->user, ft->cookie, FILE_GET_UID); |
1902 g_snprintf(buf2, sizeof(buf2), "toc_rvous_accept %s %s %s", ft->user, ft->cookie, FILE_GET_UID); |
| 1903 sflap_send(ft->gc, buf2, -1, TYPE_DATA); |
1903 sflap_send(ft->gc, buf2, -1, TYPE_DATA); |
| 1904 |
1904 |
| 1905 if (proxy_connect(ft->ip, ft->port, toc_get_file_connect, ft) < 0) { |
1905 if (proxy_connect(account, ft->ip, ft->port, toc_get_file_connect, ft) < 0) { |
| 1906 do_error_dialog(_("Could not connect for transfer."), NULL, GAIM_ERROR); |
1906 do_error_dialog(_("Could not connect for transfer."), NULL, GAIM_ERROR); |
| 1907 fclose(ft->file); |
1907 fclose(ft->file); |
| 1908 g_free(ft->filename); |
1908 g_free(ft->filename); |
| 1909 g_free(ft->cookie); |
1909 g_free(ft->cookie); |
| 1910 g_free(ft->user); |
1910 g_free(ft->user); |