Skip to contentSkip to conversation

autopair: Add special handling for printers

PATCH Applied Bastien Nocera 2 participants 2 messages Nov 19, 2013 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 autopair: Add special handling for printers

As was done in gnome-bluetooth since 2009:
https://git.gnome.org/browse/gnome-bluetooth/commit/?id=7a472c151d44a3378ecbd3c2a75c763f5c577fe9

---
 plugins/autopair.c | 8 ++++++++
 1 file changed, 8 insertions(+)
plugins/autopair.c +8 -0
index e6e5035..8c98c12 100644
@@ -121,6 +121,14 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter,
 		}
 
 		break;
+	case 0x06:		/* Imaging */
+		if (class & 0x80) {	/* Printer */
+			if (attempt > 1)
+				return 0;
+			memcpy(pinbuf, "0000", 4);
+			return 4;
+		}
+		break;
 	}
 
 	return 0;
Signature · 1 line
1.8.4.2