All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] autopair: Add special handling for printers
@ 2013-11-19 13:15 Bastien Nocera
  2013-11-19 13:36 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Bastien Nocera @ 2013-11-19 13:15 UTC (permalink / raw)
  To: linux-bluetooth


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(+)

diff --git a/plugins/autopair.c b/plugins/autopair.c
index e6e5035..8c98c12 100644
--- a/plugins/autopair.c
+++ b/plugins/autopair.c
@@ -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;
-- 
1.8.4.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-19 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19 13:15 [PATCH] autopair: Add special handling for printers Bastien Nocera
2013-11-19 13:36 ` Johan Hedberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.