fseek(fp, 0, SEEK_END);
lsize = ftell(fp);
if (lsize < 0) {
- BT_ERR("ftell() error(0x%x)", lsize);
+ BT_ERR("ftell() error(0x%lx)", lsize);
ret = BT_ERROR_OPERATION_FAILED;
goto ERROR;
}
info_start = strstr(buf, "bluetooth");
if (info_start == NULL) {
- BT_ERR("strstr() error(0x%x)", info_start);
+ BT_ERR("strstr() error(%s)", info_start);
ret = BT_ERROR_OPERATION_FAILED;
goto ERROR;
}
info_start += 10;
info_end = strstr(buf, "hcd");
if (info_end == NULL) {
- BT_ERR("strstr() error(0x%x)", info_end);
+ BT_ERR("strstr() error(%s)", info_end);
ret = BT_ERROR_OPERATION_FAILED;
goto ERROR;
}
info_size = info_end - info_start - 1;
if (info_size < 0) {
- BT_ERR("info_size is invalid(%d)", info_size);
+ BT_ERR("info_size is invalid(%ld)", info_size);
ret = BT_ERROR_OPERATION_FAILED;
goto ERROR;
}
info_end = strchr(buf, '_');
if (info_end == NULL) {
- BT_ERR("strchr() error(0x%x)", info_end);
+ BT_ERR("strchr() error(%s)", info_end);
ret = BT_ERROR_OPERATION_FAILED;
goto ERROR;
}
fseek(fp, 0, SEEK_END);
lsize = ftell(fp);
if (lsize < 0) {
- BT_ERR("ftell() error(0x%x)", lsize);
+ BT_ERR("ftell() error(0x%lx)", lsize);
ret = BT_ERROR_OPERATION_FAILED;
goto ERROR;
}
info_start = buf;
info_end = strchr(buf, ',');
if (info_end == NULL) {
- BT_ERR("strchr() error(0x%x)", info_end);
+ BT_ERR("strchr() error(%s)", info_end);
ret = BT_ERROR_OPERATION_FAILED;
goto ERROR;
}
ret = bluetooth_gatt_get_service_from_uuid(address, BT_OTP_SERVICE_UUID, &service);
if (ret != BLUETOOTH_ERROR_NONE) {
- BT_ERR("Failed to find OTP service on the remote device [%s]", address);
+ BT_ERR("Failed to find OTP service on the remote device [%s]", address->addr);
return ret;
}
(uint64_t)(value[6] & 0xFF) << 8 |
(uint64_t)(value[7] & 0xFF);
otp_client_s->otp_feature = feature;
- BT_INFO("OTP Feature [%u]", feature);
+ BT_INFO("OTP Feature [%llu]", feature);
if (BT_OTP_IS_OACP_SUPPORTED(otp_client_s->otp_feature)
&& !otp_client_s->oacp_cccd_enabled
(uint32_t)(value[5] & 0xFF) << 8 |
(uint32_t)(value[4] & 0xFF);
- BT_INFO("Object Size curr[%lu] alloc[%lu]", csize, asize);
+ BT_INFO("Object Size curr[%u] alloc[%u]", csize, asize);
if (otp_client_s->curr_op == BT_OTP_OBJECT_DISCOVERY) {
metadata->curr_size = csize;
(uint32_t)(value[2] & 0xFF) << 16 |
(uint32_t)(value[1] & 0xFF) << 8 |
(uint32_t)(value[0] & 0xFF);
- BT_INFO("Object Properties [%lu]", props);
+ BT_INFO("Object Properties [%u]", props);
/* First-created & Last-modified are optional charcacteristics */
if (otp_client_s->curr_op == BT_OTP_OBJECT_DISCOVERY) {
(uint64_t)(info->data[3] & 0xFF) << 16 |
(uint64_t)(info->data[2] & 0xFF) << 8 |
(uint64_t)(info->data[1] & 0xFF);
- BT_INFO("Changed occurred to object id %u", id);
+ BT_INFO("Changed occurred to object id %llu", id);
}
}
if (oacp_read_op->length <= oacp_read_op->size) {
written = fwrite(buffer, 1, len, oacp_read_op->fp);
oacp_read_op->length += written;
- BT_DBG("written [%d], length_sofar [%lu], received_buff_len [%d], size [%lu]",
+ BT_DBG("written [%d], length_sofar [%u], received_buff_len [%d], size [%u]",
written, oacp_read_op->length, len, oacp_read_op->size);
}
uint32_t offset = 0;
uint32_t length = object_info->curr_size;
- BT_INFO("Object ID [%llu],Offset [%lu], Length [%lu], curr_size [%lu]",
+ BT_INFO("Object ID [%llu],Offset [%u], Length [%u], curr_size [%u]",
obj_id, offset, length, object_info->curr_size);
uint8_t value[9] = {0x00};
size = (uint32_t)st.st_size;
- BT_INFO("Filepath [%s], Size[%llu]",
- file_path, size);
- BT_INFO("offset[%llu], length[%llu], mode[%u]",
- offset, length, mode);
+ BT_INFO("Filepath [%s], Size[%u]", file_path, size);
+ BT_INFO("offset[%u], length[%u], mode[%u]", offset, length, mode);
oacp_write_op = g_malloc0(sizeof(bt_otp_client_write_op));
oacp_write_op->size = size;