adapter: Catch polling errors
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 18 Nov 2013 00:48:15 +0000 (01:48 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 18 Nov 2013 00:59:51 +0000 (01:59 +0100)
commitecc73a015d5670296febd3e07aae3301db3a4158
tree891f5d0a683116ff58ab1ca61f5c194190a1cd10
parentb7f624308f1b5f3169d23f8607c5821bc38ad673
adapter: Catch polling errors

Receiving a NFC_EVENT_TARGETS_FOUND with a NULL payload means the driver
entered an error state. This is handled by checking if the devices and
targets arrays are empty from the GET_TARGET finish handler.
In the polling error case, neard resets the adapter and starts polling
again.

The polling error handler runs asynchrounously for the D-Bus properties
toggle to be exported properly.
src/adapter.c
src/near.h
src/netlink.c