| 398 /* If the socket-connected message had already been triggered when connect_data |
398 /* If the socket-connected message had already been triggered when connect_data |
| 399 * was destroyed via purple_proxy_connect_cancel(), we may get here with a freed connect_data. |
399 * was destroyed via purple_proxy_connect_cancel(), we may get here with a freed connect_data. |
| 400 */ |
400 */ |
| 401 if (!PURPLE_PROXY_CONNECT_DATA_IS_VALID(connect_data)) |
401 if (!PURPLE_PROXY_CONNECT_DATA_IS_VALID(connect_data)) |
| 402 return; |
402 return; |
| 403 |
403 |
| 404 purple_debug_info("proxy", "Connected to %s:%d.\n", |
404 purple_debug_info("proxy", "Connected to %s:%d.\n", |
| 405 connect_data->host, connect_data->port); |
405 connect_data->host, connect_data->port); |
| 406 |
406 |
| 407 /* |
407 /* |
| 408 * purple_input_get_error after a non-blocking connect returns -1 if something is |
408 * purple_input_get_error after a non-blocking connect returns -1 if something is |
| 1990 NULL); |
1990 NULL); |
| 1991 purple_prefs_connect_callback(handle, "/purple/proxy/username", |
1991 purple_prefs_connect_callback(handle, "/purple/proxy/username", |
| 1992 proxy_pref_cb, NULL); |
1992 proxy_pref_cb, NULL); |
| 1993 purple_prefs_connect_callback(handle, "/purple/proxy/password", |
1993 purple_prefs_connect_callback(handle, "/purple/proxy/password", |
| 1994 proxy_pref_cb, NULL); |
1994 proxy_pref_cb, NULL); |
| |
1995 |
| |
1996 /* Load the initial proxy settings */ |
| |
1997 proxy_pref_cb("/purple/proxy/type", PURPLE_PREF_STRING, purple_prefs_get_string("/purple/proxy/type"), NULL); |
| |
1998 proxy_pref_cb("/purple/proxy/host", PURPLE_PREF_STRING, purple_prefs_get_string("/purple/proxy/host"), NULL); |
| |
1999 proxy_pref_cb("/purple/proxy/port", PURPLE_PREF_STRING, GINT_TO_POINTER(purple_prefs_get_int("/purple/proxy/port")), NULL); |
| |
2000 proxy_pref_cb("/purple/proxy/username", PURPLE_PREF_STRING, purple_prefs_get_string("/purple/proxy/username"), NULL); |
| |
2001 proxy_pref_cb("/purple/proxy/password", PURPLE_PREF_STRING, purple_prefs_get_string("/purple/proxy/password"), NULL); |
| 1995 } |
2002 } |
| 1996 |
2003 |
| 1997 void |
2004 void |
| 1998 purple_proxy_uninit(void) |
2005 purple_proxy_uninit(void) |
| 1999 { |
2006 { |