Message ID | 20200426011935.32742-1-david@lechnology.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [BlueZ] src/gatt-client: always check properties in WriteValue | expand |
This is automated email and please do not replay to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. While we are preparing for reviewing the patches, we found the following issue/warning. Test Result: Checkpatch Failed Patch Title: [BlueZ] src/gatt-client: always check properties in WriteValue Output: WARNING:LONG_LINE: line over 80 characters #32: FILE: src/gatt-client.c:1020: + chrc->ext_props & BT_GATT_CHRC_EXT_PROP_RELIABLE_WRITE) { - total: 0 errors, 1 warnings, 20 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. Your patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPLIT_STRING NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. For more details about BlueZ coding style guide, please find it in doc/coding-style.txt --- Regards, Linux Bluetooth
diff --git a/src/gatt-client.c b/src/gatt-client.c index a9bfc2802..0bfcfa692 100644 --- a/src/gatt-client.c +++ b/src/gatt-client.c @@ -1016,8 +1016,8 @@ static DBusMessage *characteristic_write_value(DBusConnection *conn, * - If value is larger than MTU - 3: long-write * * "write-without-response" property set -> write command. */ - if ((!type && (chrc->ext_props & BT_GATT_CHRC_EXT_PROP_RELIABLE_WRITE)) - || (type && !strcasecmp(type, "reliable"))) { + if ((!type || (type && !strcasecmp(type, "reliable"))) && + chrc->ext_props & BT_GATT_CHRC_EXT_PROP_RELIABLE_WRITE) { supported = true; chrc->write_op = start_long_write(msg, chrc->value_handle, gatt, true, value, value_len, offset, @@ -1026,8 +1026,8 @@ static DBusMessage *characteristic_write_value(DBusConnection *conn, return NULL; } - if ((!type && chrc->props & BT_GATT_CHRC_PROP_WRITE) || - (type && !strcasecmp(type, "request"))) { + if ((!type || (type && !strcasecmp(type, "request"))) && + chrc->props & BT_GATT_CHRC_PROP_WRITE) { uint16_t mtu; supported = true;