Message ID | 20241014152205.66120-1-frederic.danis@collabora.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [BlueZ] tools/obexctl: Add support to connect using PSM port | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | warning | WARNING:LONG_LINE: line length of 82 exceeds 80 columns #97: FILE: tools/obexctl.c:150: + DBUS_TYPE_UINT16, &args->channel); /github/workspace/src/src/13835246.patch total: 0 errors, 1 warnings, 43 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13835246.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. |
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=898969 ---Test result--- Test Summary: CheckPatch FAIL 0.59 seconds GitLint PASS 0.26 seconds BuildEll PASS 24.80 seconds BluezMake PASS 1657.83 seconds MakeCheck PASS 13.30 seconds MakeDistcheck PASS 179.85 seconds CheckValgrind PASS 252.27 seconds CheckSmatch PASS 358.62 seconds bluezmakeextell PASS 121.47 seconds IncrementalBuild PASS 1445.71 seconds ScanBuild PASS 1016.21 seconds Details ############################## Test: CheckPatch - FAIL Desc: Run checkpatch.pl script Output: [BlueZ] tools/obexctl: Add support to connect using PSM port WARNING:LONG_LINE: line length of 82 exceeds 80 columns #97: FILE: tools/obexctl.c:150: + DBUS_TYPE_UINT16, &args->channel); /github/workspace/src/src/13835246.patch total: 0 errors, 1 warnings, 43 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13835246.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. --- Regards, Linux Bluetooth
diff --git a/tools/obexctl.c b/tools/obexctl.c index 56a76915c..3dfb72856 100644 --- a/tools/obexctl.c +++ b/tools/obexctl.c @@ -114,7 +114,7 @@ static void connect_reply(DBusMessage *message, void *user_data) struct connect_args { char *dev; char *target; - uint8_t channel; + uint16_t channel; }; static void connect_args_free(void *data) @@ -144,9 +144,14 @@ static void connect_setup(DBusMessageIter *iter, void *user_data) g_dbus_dict_append_entry(&dict, "Target", DBUS_TYPE_STRING, &args->target); - if (args->channel) - g_dbus_dict_append_entry(&dict, "Channel", - DBUS_TYPE_BYTE, &args->channel); + if (args->channel) { + if (args->channel > 31) + g_dbus_dict_append_entry(&dict, "PSM", + DBUS_TYPE_UINT16, &args->channel); + else + g_dbus_dict_append_entry(&dict, "Channel", + DBUS_TYPE_BYTE, &args->channel); + } dbus_message_iter_close_container(iter, &dict); } @@ -169,8 +174,8 @@ static void cmd_connect(int argc, char *argv[]) char *endptr = NULL; channel = strtol(argv[3], &endptr, 0); - if (!endptr || *endptr != '\0' || channel > UINT8_MAX) { - bt_shell_printf("Invalid channel\n"); + if (!endptr || *endptr != '\0' || channel > UINT16_MAX) { + bt_shell_printf("Invalid channel or PSM\n"); return bt_shell_noninteractive_quit(EXIT_FAILURE); } } @@ -1846,7 +1851,7 @@ static void cmd_mkdir(int argc, char *argv[]) static const struct bt_shell_menu main_menu = { .name = "main", .entries = { - { "connect", "<dev> [uuid] [channel]", cmd_connect, + { "connect", "<dev> [uuid] [channel|PSM]", cmd_connect, "Connect session" }, { "disconnect", "[session]", cmd_disconnect, "Disconnect session", session_generator },