Fix nfc_pick_device() when called from nfc_connect with NULL nfc_device_desc_t parameter (Fixes Issue 156)
This commit is contained in:
parent
cfc5273275
commit
605a5f2db3
3 changed files with 5 additions and 9 deletions
|
@ -185,9 +185,7 @@ acr122_probe (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t * pszDev
|
|||
}
|
||||
acr122_free_scardcontext ();
|
||||
|
||||
if (*pszDeviceFound)
|
||||
return true;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
nfc_device_t *
|
||||
|
|
|
@ -206,9 +206,8 @@ pn53x_usb_probe (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t * psz
|
|||
}
|
||||
}
|
||||
}
|
||||
if (*pszDeviceFound)
|
||||
return true;
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -191,9 +191,8 @@ nfc_pick_device (void)
|
|||
size_t szN;
|
||||
|
||||
if (!ndr->probe (pndd, 1, &szN)) {
|
||||
DBG ("%s probe failed", ndr->name);
|
||||
free (pndd);
|
||||
return NULL;
|
||||
ERR ("%s probe failed", ndr->name);
|
||||
szN = 0;
|
||||
}
|
||||
|
||||
if (szN == 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue