By convention, BlueZ code checks for "Gsource id" like variables using:
if (source_id > 0)
...
Also fix the variable type to match that returned by
g_attrib_unregister().
uint16_t window;
uint16_t iwhandle;
uint16_t refresh_handle;
- uint16_t refresh_cb_id;
+ guint refresh_cb_id;
};
static void write_scan_params(GAttrib *attrib, uint16_t handle)
{
struct scan *scan = btd_service_get_user_data(service);
- if (scan->attrib != NULL && scan->refresh_cb_id)
+ if (scan->attrib != NULL && scan->refresh_cb_id > 0)
g_attrib_unregister(scan->attrib, scan->refresh_cb_id);
btd_device_remove_attio_callback(scan->device, scan->attioid);