This makes btd_service_get_version check both local and remote version
and return the required version that the service should operate.
sdp_profile_desc_t *desc;
uint16_t version;
+ if (!service->profile->version)
+ return 0;
+
rec = btd_device_get_record(service->device,
service->profile->remote_uuid);
if (rec == NULL)
version = desc->version;
sdp_list_free(list, free);
- return version;
+ return MIN(version, service->profile->version);
}
unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)