[gnome-bluetooth] wizard: Add more debug output when fetching PIN



commit b190692a33828d8867d93b2eb3b6e11d70e14064
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Mar 13 19:23:39 2012 +0100

    wizard: Add more debug output when fetching PIN

 wizard/pin.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/wizard/pin.c b/wizard/pin.c
index 90ec757..fafc748 100644
--- a/wizard/pin.c
+++ b/wizard/pin.c
@@ -29,6 +29,7 @@
 #include <string.h>
 #include <glib.h>
 #include <bluetooth-enums.h>
+#include <bluetooth-utils.h>
 
 #include "pin.h"
 
@@ -118,6 +119,9 @@ get_pincode_for_device (guint type, const char *address, const char *name, guint
 
 	g_return_val_if_fail (address != NULL, NULL);
 
+	g_debug ("Getting pincode for device '%s' (type: %s address: %s)",
+		 name ? name : "", address, bluetooth_type_to_string (type));
+
 	/* Load the PIN database and split it in lines */
 	if (!g_file_get_contents(PIN_CODE_DB, &buf, &buf_len, NULL)) {
 		char *filename;
@@ -150,6 +154,10 @@ get_pincode_for_device (guint type, const char *address, const char *name, guint
 	if (max_digits != NULL)
 		*max_digits = data.max_digits;
 
+	g_debug ("Got pin '%s' (max digits: %d) for device '%s' (type: %s address: %s)",
+		 data.ret_pin, data.max_digits,
+		 name ? name : "", address, bluetooth_type_to_string (type));
+
 	return data.ret_pin;
 }
 



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