} else {
g_variant_get(ret, "(v)", &value);
uuid_value = (char **)g_variant_get_strv(value, &size);
- BT_DBG("Size items %d", size);
+ BT_DBG("Size items %zd", size);
}
if (uuid_value) {
folders_struct.size = g_variant_iter_n_children(iter);
folders_struct.names = (char**) g_malloc0(folders_struct.size * sizeof(*(folders_struct.names)));
- BT_DBG("g_variant_iter_n_children: %d", folders_struct.size);
+ BT_DBG("g_variant_iter_n_children: %lli", (long long int)folders_struct.size);
GVariantIter* res = NULL;
int i = 0;
while (g_variant_iter_loop(iter, "a{sv}", &res)) {
messages_struct.size = g_variant_iter_n_children(iter);
messages_struct.message_items = (bt_map_client_message_item_t*)
g_malloc(messages_struct.size * sizeof(*(messages_struct.message_items)));
- BT_DBG("g_variant_iter_n_children: %d", messages_struct.size);
+ BT_DBG("g_variant_iter_n_children: %lli", (long long int)messages_struct.size);
char *object = NULL;
GVariantIter *properites = NULL;
} else if (strcmp(key, "Size") == 0) {
g_variant_get(value, "t", &value_int);
messages_struct.message_items[i].size = value_int;
- BT_DBG(" Size: %d", value_int);
+ BT_DBG(" Size: %llu", (unsigned long long int)value_int);
} else if (strcmp(key, "Text") == 0) {
g_variant_get(value, "b", &value_bool);
messages_struct.message_items[i].is_text = value_bool ? 1 : 0;
} else if (strcmp(key, "AttachmentSize") == 0) {
g_variant_get(value, "t", &value_int);
messages_struct.message_items[i].attachment_size = value_int;
- BT_DBG(" AttachmentSize: %d", value_int);
+ BT_DBG(" AttachmentSize: %llu", (unsigned long long int)value_int);
} else if (strcmp(key, "Priority") == 0) {
g_variant_get(value, "b", &value_bool);
messages_struct.message_items[i].is_priority = value_bool ? 1 : 0;
for (i = 0; i < count; i++)
BT_DBG("%s", list[i]);
- BT_DBG("address: %s, result: %d, count: %d, success: %d",
+ BT_DBG("address: %s, result: %d, count: %zd, success: %d",
address, result, count, success);
_bt_convert_addr_string_to_type(vc_list.btaddr.addr,
if (len > 0 && len < chr_info->mtu) {
bt_gatt_char_property_t char_val;
- BT_INFO("FD io sending value changed %x %x %x %x %x %x %x %d \n", buffer[0], buffer[1], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7], len);
+ BT_INFO("FD io sending value changed %x %x %x %x %x %x %x %zd \n", buffer[0], buffer[1], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7], len);
memcpy(char_val.prop.uuid, chr_info->UUID, 16);
if (len > 0) {
- BT_INFO(" FD io sending value changed %s %d \n", buffer, len);
+ BT_INFO(" FD io sending value changed %s %zd \n", buffer, len);
bluetooth_gatt_server_write_requested_info_t write_info;
return FALSE;
}
- BT_DBG("fd: %d, len: %d, buffer: %s", fd, len, buff);
+ BT_DBG("fd: %d, len: %zd, buffer: %s", fd, len, buff);
user_info = _bt_get_user_data(BT_COMMON);
if (user_info->cb) {
if (size > 2) {
DBG("Send Adapter properties changed event to HAL user,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size);
}
done:
if (size > 2) {
DBG("Send Adapter Properties changed event to HAL user,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size);
}
done:
if (size > 2) {
DBG("Send Adapter Properties changed event to HAL user,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size);
}
done:
if (size > 2) {
DBG("Send Adapter Properties changed event to HAL user,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size);
}
done:
if (size > 2) {
DBG("Send Adapter Properties changed event to HAL user,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size);
}
done:
if (size > 1) {
DBG("Send Device found event to HAL user,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size);
}
done:
if (size > 2) {
DBG("Send Adapter properties changed event to HAL user,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size);
}
done:
ev->status = BT_STATUS_FAIL;
ev->num_props = 0;
DBG("Send Adapter properties changed event to HAL user,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size);
}
ev->num_props = 0;
ev->status = BT_STATUS_SUCCESS;
- INFO("Size [%d]", size);
+ INFO("Size [%zd]", size);
/* signature of GetManagedObjects: a{oa{sa{sv}}} */
g_variant_get(result, "(a{oa{sa{sv}}})", &iter);
if (size > 2) {
DBG("Send Adapter properties changed event to HAL user,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size);
}
done:
{
struct hal_ev_ssp_request ev;
memset(&ev, 0, sizeof(ev));
- DBG("sizeof ev [%d]", sizeof(ev));
+ DBG("sizeof ev [%zu]", sizeof(ev));
DBG("Remote Device address [%s]", address);
DBG("Remote Device Name [%s]", name);
if (size > 0) {
uuid_value = (char **)g_variant_get_strv(temp_value, &size);
- DBG("Size items %d", size);
+ DBG("Size items %zu", size);
}
if (temp_value)
ev->num_props = 0;
size = sizeof(*ev);
ERR("Error: Failed to get Remote device properties after SDP,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_REMOTE_DEVICE_PROPS, (void*) buf, size);
cleanup:
}
DBG("Send Remote Device services to HAL,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_REMOTE_DEVICE_PROPS, (void*) buf, size);
g_variant_unref(result);
ev->num_props = 0;
size = sizeof(*ev);
DBG("Send Remote Device properties event to HAL,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_REMOTE_DEVICE_PROPS, (void*) buf, size);
} else {
if (size > 2) {
DBG("Send Remote Device properties event to HAL,"
- " Num Prop [%d] total size [%d]", ev->num_props, size);
+ " Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_REMOTE_DEVICE_PROPS, (void*) buf, size);
}
}
if (size > 2) {
- DBG("Send Adapter properties changed event to HAL user, Num Prop [%d] total size [%d]", ev->num_props, size);
+ DBG("Send Adapter properties changed event to HAL user, Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, buf, size);
}
g_variant_get(msg, "(siii)", &address, &link_type, &alert_type, &rssi_dbm);
DBG("RSSI Alert: [Address %s LinkType %d] [Type %d DBM %d]",
- address, alert_type, rssi_dbm);
+ address, alert_type, rssi_dbm, link_type);
_bt_hal_convert_addr_string_to_type(ev.bdaddr, address);
ev.link_type = link_type;
gsize size1 = 0;
int i = 0;
size1 = g_variant_get_size(val);
- DBG("UUID count from size [%d]\n", size1);
+ DBG("UUID count from size [%zu]\n", size1);
int num_props_tmp = ev->num_props;
if (size1 > 0) {
DBG("-");
if (size > 1) {
- DBG("Send Device found event to HAL user, Num Prop [%d] total size [%d]", ev->num_props, size);
+ DBG("Send Device found event to HAL user, Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_DEVICE_FOUND, (void*) buf, size);
}
ERR("result is NULL\n");
}
if (size > 1) {
- DBG("Send Device found event to HAL user, Num Prop [%d] total size [%d]", ev->num_props, size);
+ DBG("Send Device found event to HAL user, Num Prop [%d] total size [%zd]", ev->num_props, size);
event_cb(HAL_EV_DEVICE_FOUND, (void*) buf, size);
}
DBG("-");
memcpy(ev->adv_data, buffer, data_len);
size += data_len;
- DBG("Send le scan result event to HAL, size: [%d]", size);
+ DBG("Send le scan result event to HAL, size: [%zd]", size);
gatt_event_cb(HAL_EV_GATT_CLIENT_SCAN_RESULT, buf, size);
g_variant_unref(value);
}
long int val;
val = g_variant_get_uint32(value);
- DBG("Value : %d", val);
+ DBG("Value : %li", val);
ev->attr[i].attr_id = HAL_MEDIA_ATTR_ID_PLAYING_TIME;
snprintf((char*)ev->attr[i].text, HAL_MAX_ATTR_STR_LEN, "%ld", val);
i++;
long int val;
val = g_variant_get_uint32(value);
- DBG("Value : %d", val);
+ DBG("Value : %li", val);
ev->attr[i].attr_id = HAL_MEDIA_ATTR_ID_NUM_TRACKS;
snprintf((char*)ev->attr[i].text, HAL_MAX_ATTR_STR_LEN, "%ld", val);
i++;
long int val;
val = g_variant_get_uint32(value);
- DBG("Value : %d", val);
+ DBG("Value : %li", val);
ev->attr[i].attr_id = HAL_MEDIA_ATTR_ID_TRACK_NUM;
snprintf((char*)ev->attr[i].text, HAL_MAX_ATTR_STR_LEN, "%ld", val);
i++;
if (sender == NULL)
return;
- DBG("Cancelled : agent %p sender %s", sender);
+ DBG("Cancelled : agent %p sender %p", priv, sender);
/* Need to check
if (g_strcmp0(sender, agent->busname) != 0)
return;
/* DEBUG */
for (i = 0; i < response->attr_value.len; i++)
- DBG("Resonse [%d] = [0x%x]", response->attr_value.value[i]);
+ DBG("Resonse [%d] = [0x%x]", i, response->attr_value.value[i]);
if (req_info->request_type == BT_HAL_GATT_REQUEST_TYPE_READ) {
GVariantBuilder *inner_builder = NULL;
app = __get_hdp_app_by_id(conn_info->app_id);
if (!app) {
- ERR("No app with app_id: %d exists");
+ ERR("No app with app_id: %d exists", conn_info->app_id);
__hdp_free_conn_info(conn_info);
return;
}
DBG("app_id: %d", app_id);
app = __get_hdp_app_by_id(app_id);
if (!app) {
- ERR("No app with app_id: %d exists");
+ ERR("No app with app_id: %d exists", app_id);
return BT_STATUS_PARM_INVALID;
}
goto fail;
}
- DBG("len: %d", len);
+ DBG("len: %zu", len);
if (0 == len) {
ERR("Other end of socket is closed");
goto fail;
goto fail;
}
- DBG("len: %d", len);
+ DBG("len: %zu", len);
if (0 == len) {
ERR("Other end of socket is closed");
goto fail;
return BT_STATUS_UNSUPPORTED;
}
- INFO("channel: %d, sock_fd: %d, type: %d", channel, sock_fd, type);
+ INFO("channel: %d, sock_fd: %d, type: %d", channel, *sock_fd, type);
switch (type) {
case BTSOCK_RFCOMM:
return BT_STATUS_UNSUPPORTED;
}
- INFO("channel: %d, sock_fd: %d, type: %d", channel, sock_fd, type);
+ INFO("channel: %d, sock_fd: %d, type: %d", channel, *sock_fd, type);
switch (type) {
case BTSOCK_RFCOMM:
return g_strdup(BT_HAL_IOTIVITY_UUID);
#endif
default:
- ERR("Unknwon Service id: %d, return NULL");
+ ERR("Unknwon Service id: %d, return NULL", service_id);
}
DBG("-");
print_bt_properties(num_properties, properties);
parse_device_properties(num_properties, properties, &dev_info, &adv_info);
- BT_INFO("number of properties= [%d] ", num_properties, size);
+ BT_INFO("number of properties= [%d] ", num_properties);
if (dev_info.type != DEV_TYPE_BREDR) {
/* BLE Single or DUAL mode found, so it should have Adv data */
case BT_PROPERTY_UUIDS: {
event_dev_services_t *services_info;
bt_uuid_t *uuids = (bt_uuid_t *) properties[0].val;
- BT_INFO("Properties len [%d] event structure size [%d]", properties[0].len, sizeof(event_dev_services_t));
+ BT_INFO("Properties len [%d] event structure size [%zu]", properties[0].len, sizeof(event_dev_services_t));
services_info = g_malloc(sizeof(event_dev_services_t) + properties[0].len);
services_info->address = dev_info->address;
ret = gatt_api->server->get_att_mtu(conn_id, mtu);
if (ret != BT_STATUS_SUCCESS) {
- BT_ERR("GATT MTU Size failed, status: %d", status2string(ret));
+ BT_ERR("GATT MTU Size failed, status: %s", status2string(ret));
return convert_to_oal_status(ret);
}
int ret;
bdstr_t bdstr;
- API_TRACE("len: %d", strlen(report));
+ API_TRACE("len: %zd", strlen(report));
CHECK_OAL_HID_ENABLED();
OAL_CHECK_PARAMETER(address, return);
OAL_CHECK_PARAMETER(report, return);
BTSOCK_RFCOMM, NULL, channel, &sock_fd, 0);
break;
default:
- BT_ERR("Socket type: %d not supported");
+ BT_ERR("Socket type: %d not supported", sock_type);
}
if (sock_fd < 0) {
svc_name, p_uuid->uuid, channel, &sock_fd, 0);
break;
default:
- BT_ERR("Socket type: %d not supported");
+ BT_ERR("Socket type: %d not supported", sock_type);
}
if (sock_fd < 0 || ret != BT_STATUS_SUCCESS) {
return TRUE;
}
- BT_DBG("Received data length %d, remote_addr = %s", len, remote_addr);
+ BT_DBG("Received data length %zu, remote_addr = %s", len, remote_addr);
if (!oacp_op->fp) {
char file_path[BT_FILE_PATH_MAX_LEN] = {0, };
if (oacp_op->length_sofar <= oacp_op->length) {
written = fwrite(buffer, 1, len, oacp_op->fp);
oacp_op->length_sofar += written;
- BT_DBG("written [%d], length_sofar [%lu], received_buff_len [%d], size [%lu]",
+ BT_DBG("written [%d], length_sofar [%u], received_buff_len [%zu], size [%u]",
written, oacp_op->length_sofar, len, oacp_op->length);
}
if (opcode == OACP_WRITE)
mode = (uint8_t)value[9] & 0xFF;
- BT_INFO("Offset = %lu, Length = %lu", object_offset, length, mode);
+ BT_INFO("Offset = %u, Length = %u", object_offset, length);
if (oacp_op) {
if (otc_connection_status) {
(uint64_t)(value[3] & 0xFF) << 16 |
(uint64_t)(value[2] & 0xFF) << 8 |
(uint64_t)(value[1] & 0xFF);
- BT_INFO("Object ID [%llu]", object_id);
+ BT_INFO("Object ID [%llu]", (unsigned long long int)object_id);
if (selected_object && selected_object->id == object_id)
goto fail;
break;
}
default:
- BT_ERR("Unknown state: %d", _bt_adapter_get_le_status);
+ BT_ERR("Unknown state: %d", _bt_adapter_get_le_status());
break;
}
{
bt_service_oal_event_data_t *oal_event = g_new0(bt_service_oal_event_data_t, 1);
- BT_INFO("event_type: [%d], data size: [%d]", event_type, len);
+ BT_INFO("event_type: [%d], data size: [%zu]", event_type, len);
oal_event->type = event_type;
if (event_data)
BT_HF_LOCAL_TERM_EVENT_INTERFACE,
BT_HF_LOCAL_TERM, g_variant_new("s", address),
&error)) {
- BT_ERR("Error while sending Signal: %s", signal);
+ BT_ERR("Error while sending Signal: %s", address);
if (error) {
BT_ERR("Error Code [%d], Error Message [%s]",
error->code, error->message);
BT_INFO("GATT Client [%s] is connected, conn Id [%d] Instance ID [%d]",
conn_info->addr, conn_info->connection_id, conn_info->instance_id);
} else {
- BT_ERR("GATT Client [%s] is not yet connected..");
+ BT_ERR("GATT Client [%s] is not yet connected..", addr);
return BLUETOOTH_ERROR_NOT_CONNECTED;
}
memcpy(&uuid.uuid, &svc_info->uuid, BLUETOOTH_UUID_HEX_MAX_LEN);
_bt_uuid_to_string(&uuid, uuid_string);
- BT_INFO("Service UUID formed [%s] strlen [%d]", uuid_string, strlen(uuid_string));
+ BT_INFO("Service UUID formed [%s] strlen [%zd]", uuid_string, strlen(uuid_string));
/* Fill UUID of service */
g_strlcpy(info->uuids[count], uuid_string,
BLUETOOTH_UUID_STRING_MAX);
- BT_INFO("Service UUID formed TO be sent [%s] strlen [%d]",
+ BT_INFO("Service UUID formed TO be sent [%s] strlen [%zd]",
info->uuids[count], strlen(info->uuids[count]));
/* Fill instance ID of service */
info->inst_id[count] = svc_info->inst_id;
if (event_data->uuid_status.conn_status.status != OAL_STATUS_SUCCESS)
result = BLUETOOTH_ERROR_INTERNAL;
else {
- BT_INFO("desc data len:", event_data->data_len);
+ BT_INFO("desc data len:%d", event_data->data_len);
if (event_data->data_len > 0) {
/* DEBUG */
for (i = 0; i < event_data->data_len; i++)
retv_if(connection == NULL, NULL);
retv_if(address == NULL, NULL);
- BT_DBG("net_conn: %x", connection);
+ BT_DBG("net_conn: %p", connection);
_bt_util_addr_type_to_addr_net_string(net_address, address);
sock_fd = socket_connect(OAL_SOCK_RFCOMM, &uuid, channel, &bd);
break;
default:
- BT_ERR("Socket type: %d not supported");
+ BT_ERR("Socket type: %d not supported", sock_type);
return BLUETOOTH_ERROR_NOT_SUPPORT;
}
sock_fd = socket_listen(OAL_SOCK_RFCOMM, &uuid, svc_name, channel);
break;
default:
- BT_ERR("Socket type: %d not supported");
+ BT_ERR("Socket type: %d not supported", sock_type);
return BLUETOOTH_ERROR_NOT_SUPPORT;
}