sixaxis: Fix another problem with already setup devices
authorBastien Nocera <hadess@hadess.net>
Fri, 7 Jun 2019 06:54:10 +0000 (08:54 +0200)
committerhimanshu <h.himanshu@samsung.com>
Tue, 11 Feb 2020 08:57:47 +0000 (14:27 +0530)
If the device went through any kind of pairing once, it might have been
set as trusted. Make sure to set the device as untrusted before starting
the cable pairing authorization so that we don't exit early from
process_auth_queue() (which considers trusted devices to be paired).

Change-Id: I14812c9ff7738767d84c867553b4572870faea84
Signed-off-by: himanshu <h.himanshu@samsung.com>
plugins/sixaxis.c

index 9290dbe..591eea2 100755 (executable)
@@ -364,6 +364,7 @@ static bool setup_device(int fd, const char *sysfs_path,
 
        btd_device_device_set_name(device, cp->name);
        btd_device_set_pnpid(device, cp->source, cp->vid, cp->pid, cp->version);
+       btd_device_set_trusted(device, false);
        btd_device_set_temporary(device, true);
 
        closure = g_new0(struct authentication_closure, 1);