changeset 8130:ff88d4cbf4db

[gaim-migrate @ 8835] Some whitespace fixins, and a possible segfault fix. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 17 Jan 2004 10:28:33 +0000
parents 52cdf2740654
children 968425e5da2f
files src/connection.c
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/connection.c	Sat Jan 17 09:03:05 2004 +0000
+++ b/src/connection.c	Sat Jan 17 10:28:33 2004 +0000
@@ -108,16 +108,16 @@
 
 	g_return_if_fail(gc != NULL);
 
-	gaim_debug(GAIM_DEBUG_INFO, "connection",
-			"Registering.  gc = %p\n", gc);
+	gaim_debug(GAIM_DEBUG_INFO, "connection", "Registering.  gc = %p\n", gc);
 
 	ops = gaim_connections_get_ui_ops();
 
 	if (gc->prpl != NULL)
-	        prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
-	else {
-	        gchar *message = g_strdup_printf(_("Missing protocol plugin for %s"),
-						 gaim_account_get_username(gaim_connection_get_account(gc)));
+		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+	else
+	{
+		gchar *message = g_strdup_printf(_("Missing protocol plugin for %s"),
+			gaim_account_get_username(gaim_connection_get_account(gc)));
 
 		gaim_debug(GAIM_DEBUG_ERROR, "connection",
 			   "Could not get prpl info for %p\n", gc);
@@ -127,6 +127,9 @@
 		return;
 	}
 
+	if (prpl_info->register_user == NULL)
+		return;
+
 	account = gaim_connection_get_account(gc);
 
 	if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED)
@@ -164,8 +167,8 @@
 	if (gc->prpl != NULL)
 	        prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
 	else {
-	        gchar *message = g_strdup_printf(_("Missing protocol plugin for %s"),
-						 gaim_account_get_username(gaim_connection_get_account(gc)));
+		gchar *message = g_strdup_printf(_("Missing protocol plugin for %s"),
+			gaim_account_get_username(gaim_connection_get_account(gc)));
 
 		gaim_debug(GAIM_DEBUG_ERROR, "connection",
 			   "Could not get prpl info for %p\n", gc);
@@ -276,10 +279,10 @@
 }
 
 /*
- * d:)->-< 
+ * d:)->-<
  *
  * d:O-\-<
- * 
+ *
  * d:D-/-<
  *
  * d8D->-< DANCE!