Mercurial > pidgin
diff src/sslconn.c @ 6764:6d0d4e9149b9
[gaim-migrate @ 7296]
well, jabber.org is being a pain in the moment, as is my server. but this seems to work, so here it is. Jabber SSL support. Make sure you set the port to 5223 and check the "Use SSL" checkbox in the account editor.
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Sat, 06 Sep 2003 16:04:41 +0000 |
| parents | 818ce550d2ce |
| children | aa619031193b |
line wrap: on
line diff
--- a/src/sslconn.c Sat Sep 06 15:15:24 2003 +0000 +++ b/src/sslconn.c Sat Sep 06 16:04:41 2003 +0000 @@ -93,8 +93,8 @@ gsc->host = g_strdup(host); gsc->port = port; - gsc->user_data = data; - gsc->input_func = func; + gsc->connect_cb_data = data; + gsc->connect_cb = func; i = gaim_proxy_connect(account, host, port, ops->connect_cb, gsc); @@ -109,6 +109,29 @@ return (GaimSslConnection *)gsc; } +static void +recv_cb(gpointer data, gint source, GaimInputCondition cond) +{ + GaimSslConnection *gsc = data; + + gsc->recv_cb(gsc->recv_cb_data, gsc, cond); +} + +void +gaim_ssl_input_add(GaimSslConnection *gsc, GaimSslInputFunction func, void *data) +{ + GaimSslOps *ops; + + g_return_if_fail(func != NULL); + g_return_if_fail(gaim_ssl_is_supported()); + + ops = gaim_ssl_get_ops(); + + gsc->recv_cb_data = data; + gsc->recv_cb = func; + gsc->inpa = gaim_input_add(gsc->fd, GAIM_INPUT_READ, recv_cb, gsc); +} + GaimSslConnection * gaim_ssl_connect_fd(GaimAccount *account, int fd, GaimSslInputFunction func, void *data) @@ -133,8 +156,8 @@ gsc = g_new0(GaimSslConnection, 1); - gsc->user_data = data; - gsc->input_func = func; + gsc->connect_cb_data = data; + gsc->connect_cb = func; ops->connect_cb(gsc, fd, GAIM_INPUT_READ);
