comparison libpurple/sslconn.c @ 23847:48958ca5abad

Close notify and request dialogs with PurpleSslConnection as handle. This fixes crashes with the Accept/Reject Certificate dialog after an account is disabled. It only works because the NSS and GnuTLS plugins pass the sslconn as their callback data, and the certificate code uses that data as the handle. Not sure, but I still think this will leak PurpleCertificateVerificationRequest's though because there doesn't seem to be anyone hanging on to them.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 18 Aug 2008 01:00:58 +0000
parents 6bf32c9e15a7
children 8282911d5e17
comparison
equal deleted inserted replaced
23846:3f0b3c31a015 23847:48958ca5abad
25 */ 25 */
26 #include "internal.h" 26 #include "internal.h"
27 27
28 #include "certificate.h" 28 #include "certificate.h"
29 #include "debug.h" 29 #include "debug.h"
30 #include "request.h"
30 #include "sslconn.h" 31 #include "sslconn.h"
31 32
32 static gboolean _ssl_initialized = FALSE; 33 static gboolean _ssl_initialized = FALSE;
33 static PurpleSslOps *_ssl_ops = NULL; 34 static PurpleSslOps *_ssl_ops = NULL;
34 35
225 { 226 {
226 PurpleSslOps *ops; 227 PurpleSslOps *ops;
227 228
228 g_return_if_fail(gsc != NULL); 229 g_return_if_fail(gsc != NULL);
229 230
231 purple_request_close_with_handle(gsc);
232 purple_notify_close_with_handle(gsc);
233
230 ops = purple_ssl_get_ops(); 234 ops = purple_ssl_get_ops();
231 (ops->close)(gsc); 235 (ops->close)(gsc);
232 236
233 if (gsc->connect_data != NULL) 237 if (gsc->connect_data != NULL)
234 purple_proxy_connect_cancel(gsc->connect_data); 238 purple_proxy_connect_cancel(gsc->connect_data);