diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-11-19 14:15:40 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-11-19 15:35:19 +0200 |
commit | ffd321f1e189c8bf99ca0f53c5ee030436c8bf29 (patch) | |
tree | 65c3bdc3ea8c46bffd485a485a77821727e24c07 /plugins/autopair.c | |
parent | 0a5ae04d8e1b666617d9d2790e56df80f00b63ec (diff) | |
download | bluez-ffd321f1e189c8bf99ca0f53c5ee030436c8bf29.tar.gz |
autopair: Add special handling for printers
As was done in gnome-bluetooth since 2009:
https://git.gnome.org/browse/gnome-bluetooth/commit/?id=7a472c151d44a3378ecbd3c2a75c763f5c577fe9
Diffstat (limited to 'plugins/autopair.c')
-rw-r--r-- | plugins/autopair.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/autopair.c b/plugins/autopair.c index e6e5035e3..8c98c12ba 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; |