changeset 14596:56cdf406ff31

[gaim-migrate @ 17323] SF Patch #1561792 from Mike Stoddard "The Novell prpl is currently not functional in the trunk. It is crashing in novell_login. This patch fixes it." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 19 Sep 2006 23:27:17 +0000
parents 209e187246c5
children 76542e1edf70
files libgaim/protocols/novell/novell.c
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/protocols/novell/novell.c	Tue Sep 19 22:53:47 2006 +0000
+++ b/libgaim/protocols/novell/novell.c	Tue Sep 19 23:27:17 2006 +0000
@@ -1722,10 +1722,6 @@
 	if ((user == NULL) || (conn = user->conn) == NULL)
 		return;
 
-	conn->ssl_conn = g_new0(NMSSLConn, 1);
-	conn->ssl_conn->read = (nm_ssl_read_cb) gaim_ssl_read;
-	conn->ssl_conn->write = (nm_ssl_write_cb) gaim_ssl_write;
-
 	gaim_connection_update_progress(gc, _("Authenticating..."),
 									2, NOVELL_CONNECT_STEPS);
 
@@ -2181,7 +2177,7 @@
 	name = gaim_account_get_username(account);
 
 	user = nm_initialize_user(name, server, port, account, _event_callback);
-	if (user) {
+	if (user && user->conn) {
 		/* save user */
 		gc->proto_data = user;
 
@@ -2190,9 +2186,14 @@
 										1, NOVELL_CONNECT_STEPS);
 
 		user->conn->use_ssl = TRUE;
+
+		user->conn->ssl_conn = g_new0(NMSSLConn, 1);
+		user->conn->ssl_conn->read = (nm_ssl_read_cb) gaim_ssl_read;
+		user->conn->ssl_conn->write = (nm_ssl_write_cb) gaim_ssl_write;
+
 		user->conn->ssl_conn->data = gaim_ssl_connect(user->client_data,
-				user->conn->addr, user->conn->port,
-				novell_ssl_connected_cb, novell_ssl_connect_error, gc);
+													  user->conn->addr, user->conn->port,
+													  novell_ssl_connected_cb, novell_ssl_connect_error, gc);
 		if (user->conn->ssl_conn->data == NULL) {
 			gaim_connection_error(gc, _("Error."
 										" SSL support is not installed."));