comparison plugins/ssl/ssl-nss.c @ 14160:c8ebbc0110f4

[gaim-migrate @ 16808] gaim_ssl_connect's are now cancelable (without crashing, anyway) This was relatively easy, because the PRPLs already keep a reference to the GaimSslConnection. I just needed to update the core ssl code to keep track of the GaimProxyConnectInfo, and to call gaim_proxy_connect_cancel() when gaim_ssl_close() is called committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 17 Aug 2006 05:47:10 +0000
parents 43268b823440
children
comparison
equal deleted inserted replaced
14159:ff3db5cdeb9f 14160:c8ebbc0110f4
235 235
236 gsc->connect_cb(gsc->connect_cb_data, gsc, cond); 236 gsc->connect_cb(gsc->connect_cb_data, gsc, cond);
237 } 237 }
238 238
239 static void 239 static void
240 ssl_nss_connect_cb(gpointer data, gint source, GaimInputCondition cond) 240 ssl_nss_connect(GaimSslConnection *gsc)
241 { 241 {
242 GaimSslConnection *gsc = (GaimSslConnection *)data;
243 GaimSslNssData *nss_data = g_new0(GaimSslNssData, 1); 242 GaimSslNssData *nss_data = g_new0(GaimSslNssData, 1);
244 PRSocketOptionData socket_opt; 243 PRSocketOptionData socket_opt;
245 244
246 gsc->private_data = nss_data; 245 gsc->private_data = nss_data;
247
248 gsc->fd = source;
249 246
250 nss_data->fd = PR_ImportTCPSocket(gsc->fd); 247 nss_data->fd = PR_ImportTCPSocket(gsc->fd);
251 248
252 if (nss_data->fd == NULL) 249 if (nss_data->fd == NULL)
253 { 250 {
357 354
358 static GaimSslOps ssl_ops = 355 static GaimSslOps ssl_ops =
359 { 356 {
360 ssl_nss_init, 357 ssl_nss_init,
361 ssl_nss_uninit, 358 ssl_nss_uninit,
362 ssl_nss_connect_cb, 359 ssl_nss_connect,
363 ssl_nss_close, 360 ssl_nss_close,
364 ssl_nss_read, 361 ssl_nss_read,
365 ssl_nss_write 362 ssl_nss_write
366 }; 363 };
367 364