Message ID | 20241008080126.48703-2-iulia.tanasescu@nxp.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 1c681c553f4590ed7e4cba13185bbdc0d070cc81 |
Headers | show |
Series | Add Scan Delegator support for Set Broadcast Code op | 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=896570 ---Test result--- Test Summary: CheckPatch PASS 2.88 seconds GitLint PASS 1.85 seconds BuildEll PASS 24.33 seconds BluezMake PASS 1581.36 seconds MakeCheck PASS 13.28 seconds MakeDistcheck PASS 176.72 seconds CheckValgrind PASS 249.58 seconds CheckSmatch PASS 350.78 seconds bluezmakeextell PASS 118.16 seconds IncrementalBuild PASS 10361.16 seconds ScanBuild PASS 1063.81 seconds --- Regards, Linux Bluetooth
diff --git a/client/player.c b/client/player.c index df2246516..188378175 100644 --- a/client/player.c +++ b/client/player.c @@ -5150,15 +5150,23 @@ static void set_bcode_cb(const DBusError *error, void *user_data) static void set_bcode(const char *input, void *user_data) { GDBusProxy *proxy = user_data; - char *bcode = g_strdup(input); + char *bcode; + + if (!strcasecmp(input, "n") || !strcasecmp(input, "no")) + bcode = g_new0(char, 16); + else + bcode = g_strdup(input); if (g_dbus_proxy_set_property_dict(proxy, "QoS", set_bcode_cb, user_data, NULL, "BCode", DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, strlen(bcode), bcode, NULL) == FALSE) { bt_shell_printf("Setting broadcast code failed\n"); + g_free(bcode); return bt_shell_noninteractive_quit(EXIT_FAILURE); } + + g_free(bcode); } static void transport_select(GDBusProxy *proxy, bool prompt) @@ -5183,7 +5191,8 @@ static void transport_select(GDBusProxy *proxy, bool prompt) dbus_message_iter_get_basic(&value, &encryption); if (encryption == 1) { bt_shell_prompt_input("", - "Enter broadcast code:", set_bcode, proxy); + "Enter brocast code[value/no]:", + set_bcode, proxy); return; } break;