projects
/
platform
/
core
/
connectivity
/
bluetooth-frwk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[OTP] Fix PTS fail cases
[platform/core/connectivity/bluetooth-frwk.git]
/
bt-otp
/
bt-otpserver.c
diff --git
a/bt-otp/bt-otpserver.c
b/bt-otp/bt-otpserver.c
index
4948a8c
..
c68068d
100644
(file)
--- a/
bt-otp/bt-otpserver.c
+++ b/
bt-otp/bt-otpserver.c
@@
-298,8
+298,8
@@
int _bt_otp_prepare_ots(void)
char *desc_uuid;
bt_gatt_characteristic_property_t props;
bt_gatt_permission_t perms;
char *desc_uuid;
bt_gatt_characteristic_property_t props;
bt_gatt_permission_t perms;
- char supp_feat[OTP_FEATURE_LENGTH] = { 0x
DC
, 0x00, 0x00, 0x00,
- 0x
80
, 0x00, 0x00, 0x00 };
+ char supp_feat[OTP_FEATURE_LENGTH] = { 0x
3B
, 0x00, 0x00, 0x00,
+ 0x
01
, 0x00, 0x00, 0x00 };
ret = bluetooth_gatt_init();
if (ret != BLUETOOTH_ERROR_NONE) {
ret = bluetooth_gatt_init();
if (ret != BLUETOOTH_ERROR_NONE) {
@@
-1558,6
+1558,7
@@
static void _bt_otp_send_indication(const char *obj_path,
{
int ret = BLUETOOTH_ERROR_NONE;
char value[7] = {0x00};
{
int ret = BLUETOOTH_ERROR_NONE;
char value[7] = {0x00};
+ int length = OTP_INDICATION_LEN_WITHOUT_RESP;
BT_DBG("");
BT_DBG("");
@@
-1569,12
+1570,13
@@
static void _bt_otp_send_indication(const char *obj_path,
value[5] = (info->resp_param[4] >> 16) & 0xFF;
value[4] = (info->resp_param[5] >> 8) & 0xFF;
value[3] = info->resp_param[6] & 0xFF;
value[5] = (info->resp_param[4] >> 16) & 0xFF;
value[4] = (info->resp_param[5] >> 8) & 0xFF;
value[3] = info->resp_param[6] & 0xFF;
+ length = OTP_INDICATION_LEN_WITH_RESP;
}
BT_DBG("Opcode: %d", value[1]);
/* Store the status value */
}
BT_DBG("Opcode: %d", value[1]);
/* Store the status value */
- _bt_otp_set_char_value(obj_path, value,
7
);
+ _bt_otp_set_char_value(obj_path, value,
length
);
/* Send indication */
ret = bluetooth_gatt_server_set_notification(obj_path, remote_address);
/* Send indication */
ret = bluetooth_gatt_server_set_notification(obj_path, remote_address);
@@
-1582,7
+1584,7
@@
static void _bt_otp_send_indication(const char *obj_path,
BT_ERR("_bt_otp_send_control_point_indication failed");
return;
}
BT_ERR("_bt_otp_send_control_point_indication failed");
return;
}
- ret = bluetooth_gatt_update_characteristic(obj_path, value,
7
);
+ ret = bluetooth_gatt_update_characteristic(obj_path, value,
length
);
if (ret != BLUETOOTH_ERROR_NONE) {
BT_ERR("_bt_otp_send_control_point_indication failed");
return;
if (ret != BLUETOOTH_ERROR_NONE) {
BT_ERR("_bt_otp_send_control_point_indication failed");
return;