Message ID | 20230817201401.3001315-1-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [BlueZ] profile: Remove probe_on_discover | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/BuildEll | success | Build ELL PASS |
tedd_an/BluezMake | success | Bluez Make PASS |
tedd_an/MakeCheck | success | Bluez Make Check PASS |
tedd_an/MakeDistcheck | success | Make Distcheck PASS |
tedd_an/CheckValgrind | success | Check Valgrind PASS |
tedd_an/CheckSmatch | success | CheckSparse PASS |
tedd_an/bluezmakeextell | success | Make External ELL PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
tedd_an/ScanBuild | success | Scan Build PASS |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=777134 ---Test result--- Test Summary: CheckPatch PASS 0.51 seconds GitLint PASS 0.33 seconds BuildEll PASS 33.26 seconds BluezMake PASS 1193.14 seconds MakeCheck PASS 13.26 seconds MakeDistcheck PASS 190.50 seconds CheckValgrind PASS 318.08 seconds CheckSmatch PASS 442.40 seconds bluezmakeextell PASS 131.80 seconds IncrementalBuild PASS 1025.37 seconds ScanBuild PASS 1398.95 seconds --- Regards, Linux Bluetooth
diff --git a/src/device.c b/src/device.c index ecd385cf813a..6d46fdb83b19 100644 --- a/src/device.c +++ b/src/device.c @@ -3930,17 +3930,13 @@ static bool device_match_profile(struct btd_device *device, struct btd_profile *profile, GSList *uuids) { + GSList *l; + if (profile->remote_uuid == NULL) return false; - /* Don't match if device was just discovered, is temporary, and the - * profile don't have probe_on_discover flag set. - */ - if (device->temporary && !profile->probe_on_discover) - return false; - - if (g_slist_find_custom(uuids, profile->remote_uuid, - bt_uuid_strcmp) == NULL) + l = g_slist_find_custom(uuids, profile->remote_uuid, bt_uuid_strcmp); + if (!l) return false; return true; @@ -4903,8 +4899,6 @@ void device_probe_profiles(struct btd_device *device, GSList *uuids) goto add_uuids; } - DBG("Probing profiles for device %s", addr); - btd_profile_foreach(dev_probe, &d); add_uuids: @@ -6932,9 +6926,6 @@ void btd_device_add_uuid(struct btd_device *device, const char *uuid) GSList *uuid_list; char *new_uuid; - if (g_slist_find_custom(device->uuids, uuid, bt_uuid_strcmp)) - return; - new_uuid = g_strdup(uuid); uuid_list = g_slist_append(NULL, new_uuid); @@ -6942,11 +6933,6 @@ void btd_device_add_uuid(struct btd_device *device, const char *uuid) g_free(new_uuid); g_slist_free(uuid_list); - - store_device_info(device); - - g_dbus_emit_property_changed(dbus_conn, device->path, - DEVICE_INTERFACE, "UUIDs"); } static sdp_list_t *read_device_records(struct btd_device *device) diff --git a/src/profile.h b/src/profile.h index cfc50058812d..6871f2f0d7d8 100644 --- a/src/profile.h +++ b/src/profile.h @@ -33,11 +33,6 @@ struct btd_profile { */ bool experimental; - /* Indicates the profile needs to be probed when the remote_uuid is - * discovered. - */ - bool probe_on_discover; - int (*device_probe) (struct btd_service *service); void (*device_remove) (struct btd_service *service);
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> The concept of probing not connected devices is already supported when loading devices from storage, so drivers shall already be capabable of handling such a thing as there are dedicated callbacks to indicate when there is a new connection in the form of .accept callback. --- src/device.c | 22 ++++------------------ src/profile.h | 5 ----- 2 files changed, 4 insertions(+), 23 deletions(-)