Diff between cd8197d5b1d4bc8fdd21170a0c9f984ccd0783f9 and db4ec110361a288886bb2160b6fede7654167f90

Changed Files

File Additions Deletions Status
plugins/autopair.c +11 -1 modified

Full Patch

diff --git a/plugins/autopair.c b/plugins/autopair.c
index d44cf53..6980b0a 100644
--- a/plugins/autopair.c
+++ b/plugins/autopair.c
@@ -60,13 +60,23 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter,
 {
 	char addr[18];
 	char pinstr[7];
+	char name[25];
 	uint32_t class;
 
 	ba2str(device_get_address(device), addr);
 
 	class = btd_device_get_class(device);
 
-	DBG("device %s 0x%x", addr, class);
+	device_get_name(device, name, sizeof(name));
+
+	DBG("device '%s' (%s) class: 0x%x vid/pid: 0x%X/0x%X",
+		name, addr, class,
+		btd_device_get_vendor (device),
+		btd_device_get_product (device));
+
+	/* The iCade shouldn't use random PINs like normal keyboards */
+	if (name != NULL && strstr(name, "iCade") != NULL)
+		return 0;
 
 	/* This is a class-based pincode guesser. Ignore devices with an
 	 * unknown class.