[gnome-bluetooth] Clean up old state when restarting pairing



commit 7f8603b0a4dc433cf3d997394ab4ae297eade9d0
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jun 16 14:58:38 2009 +0100

    Clean up old state when restarting pairing

 wizard/main.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/wizard/main.c b/wizard/main.c
index b24ae0d..1c03080 100644
--- a/wizard/main.c
+++ b/wizard/main.c
@@ -152,8 +152,16 @@ void
 restart_button_clicked (GtkButton *button,
 			gpointer user_data)
 {
-	gtk_assistant_set_current_page (window_assistant, PAGE_SEARCH);
+	/* Clean up old state */
 	update_random_pincode ();
+	target_ssp = FALSE;
+	target_type = BLUETOOTH_TYPE_ANY;
+	g_free (target_address);
+	target_address = NULL;
+	g_free (target_name);
+	target_name = NULL;
+
+	gtk_assistant_set_current_page (window_assistant, PAGE_SEARCH);
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]