summaryrefslogtreecommitdiffstats
path: root/btif
diff options
context:
space:
mode:
authorMatthew Xie <mattx@google.com>2012-04-07 04:41:39 -0700
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:23 -0700
commit595bced8e7c280e37a75b9bf9c1f36263434041c (patch)
treeb5edc7d472aa7ce62cf8204646c9c569da547945 /btif
parent2c79674ef766378464559c8645c74db5687280a9 (diff)
downloadexternal_bluetooth_bluedroid-595bced8e7c280e37a75b9bf9c1f36263434041c.zip
external_bluetooth_bluedroid-595bced8e7c280e37a75b9bf9c1f36263434041c.tar.gz
external_bluetooth_bluedroid-595bced8e7c280e37a75b9bf9c1f36263434041c.tar.bz2
replace logx with alogx
Conflicts: btif/src/btif_core.c btif/src/btif_dm.c btif/src/btif_hh.c btif/src/btif_sock.c gki/ulinux/gki_ulinux.c hci/include/bt_hci_bdroid.h hci/src/bt_hci_bdroid.c hci/src/btsnoop.c hci/src/hci_h4.c hci/src/userial.c vendor/libvendor/src/hardware.c vendor/libvendor/src/upio.c
Diffstat (limited to 'btif')
-rw-r--r--btif/co/bta_pan_co.c40
-rw-r--r--btif/include/btif_common.h4
-rw-r--r--btif/include/btif_sock_util.h4
-rw-r--r--btif/src/bluetooth.c6
-rwxr-xr-xbtif/src/btif_av.c2
-rwxr-xr-xbtif/src/btif_core.c2
-rwxr-xr-xbtif/src/btif_dm.c6
-rwxr-xr-xbtif/src/btif_hh.c16
-rwxr-xr-xbtif/src/btif_hl.c4
-rw-r--r--btif/src/btif_pan.c14
-rwxr-xr-xbtif/src/btif_rc.c2
-rw-r--r--btif/src/btif_sock.c8
-rw-r--r--btif/src/btif_sock_rfc.c12
-rw-r--r--btif/src/btif_sock_sdp.c8
-rw-r--r--btif/src/btif_sock_thread.c8
-rw-r--r--btif/src/btif_sock_util.c12
-rwxr-xr-xbtif/src/btif_storage.c6
17 files changed, 77 insertions, 77 deletions
diff --git a/btif/co/bta_pan_co.c b/btif/co/bta_pan_co.c
index 1b6da4f..63f7c6c 100644
--- a/btif/co/bta_pan_co.c
+++ b/btif/co/bta_pan_co.c
@@ -68,11 +68,11 @@
#include <cutils/log.h>
-#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define warn(fmt, ...) LOGW ("## WARNING : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
-#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
-#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define warn(fmt, ...) ALOGW ("## WARNING : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
+#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
+#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
@@ -90,7 +90,7 @@
UINT8 bta_pan_co_init(UINT8 *q_level)
{
- LOGD("bta_pan_co_init");
+ ALOGD("bta_pan_co_init");
/* set the q_level to 30 buffers */
*q_level = 30;
@@ -118,14 +118,14 @@ UINT8 bta_pan_co_init(UINT8 *q_level)
void bta_pan_co_open(UINT16 handle, UINT8 app_id, tBTA_PAN_ROLE local_role, tBTA_PAN_ROLE peer_role, BD_ADDR peer_addr)
{
- LOGD("bta_pan_co_open:app_id:%d, local_role:%d, peer_role:%d, handle:%d",
+ ALOGD("bta_pan_co_open:app_id:%d, local_role:%d, peer_role:%d, handle:%d",
app_id, local_role, peer_role, handle);
btpan_conn_t* conn = btpan_find_conn_addr(peer_addr);
if(conn == NULL)
conn = btpan_new_conn(handle, peer_addr, local_role, peer_role);
if(conn)
{
- LOGD("bta_pan_co_open:tap_fd:%d, open_count:%d, conn->handle:%d should = handle:%d, local_role:%d, remote_role:%d",
+ ALOGD("bta_pan_co_open:tap_fd:%d, open_count:%d, conn->handle:%d should = handle:%d, local_role:%d, remote_role:%d",
btpan_cb.tap_fd, btpan_cb.open_count, conn->handle, handle, conn->local_role, conn->remote_role);
//refresh the role & bt address
@@ -160,11 +160,11 @@ void bta_pan_co_open(UINT16 handle, UINT8 app_id, tBTA_PAN_ROLE local_role, tBTA
*******************************************************************************/
void bta_pan_co_close(UINT16 handle, UINT8 app_id)
{
- LOGD("bta_pan_co_close:app_id:%d, handle:%d", app_id, handle);
+ ALOGD("bta_pan_co_close:app_id:%d, handle:%d", app_id, handle);
btpan_conn_t* conn = btpan_find_conn_handle(handle);
if(conn && conn->state == PAN_STATE_OPEN)
{
- LOGD("bta_pan_co_close");
+ ALOGD("bta_pan_co_close");
// let bta close event reset this handle as it needs
// the handle to find the connection upon CLOSE
@@ -211,12 +211,12 @@ void bta_pan_co_tx_path(UINT16 handle, UINT8 app_id)
BOOLEAN ext;
BOOLEAN forward;
- LOGD("bta_pan_co_tx_path, handle:%d, app_id:%d", handle, app_id);
+ ALOGD("bta_pan_co_tx_path, handle:%d, app_id:%d", handle, app_id);
btpan_conn_t* conn = btpan_find_conn_handle(handle);
if(conn && conn->state != PAN_STATE_OPEN)
{
- LOGE("bta_pan_co_tx_path: cannot find pan connction or conn is not opened, conn:%p, conn->state:%d", conn, conn->state);
+ ALOGE("bta_pan_co_tx_path: cannot find pan connction or conn is not opened, conn:%p, conn->state:%d", conn, conn->state);
return;
}
do
@@ -226,10 +226,10 @@ void bta_pan_co_tx_path(UINT16 handle, UINT8 app_id)
if ((p_buf = bta_pan_ci_readbuf(handle, src, dst, &protocol,
&ext, &forward)))
{
- LOGD("bta_pan_co_tx_path, calling btapp_tap_send, p_buf->len:%d, offset:%d", p_buf->len, p_buf->offset);
+ ALOGD("bta_pan_co_tx_path, calling btapp_tap_send, p_buf->len:%d, offset:%d", p_buf->len, p_buf->offset);
if(is_empty_eth_addr(conn->eth_addr) && is_valid_bt_eth_addr(src))
{
- LOGD("pan bt peer addr: %02x:%02x:%02x:%02x:%02x:%02x, update its ethernet addr: %02x:%02x:%02x:%02x:%02x:%02x",
+ ALOGD("pan bt peer addr: %02x:%02x:%02x:%02x:%02x:%02x, update its ethernet addr: %02x:%02x:%02x:%02x:%02x:%02x",
conn->peer[0], conn->peer[1], conn->peer[2], conn->peer[3],conn->peer[4], conn->peer[5],
src[0], src[1], src[2], src[3],src[4], src[5]);
memcpy(conn->eth_addr, src, sizeof(conn->eth_addr));
@@ -261,7 +261,7 @@ void bta_pan_co_rx_path(UINT16 handle, UINT8 app_id)
UINT8 i;
- LOGD("bta_pan_co_rx_path not used");
+ ALOGD("bta_pan_co_rx_path not used");
}
@@ -282,7 +282,7 @@ void bta_pan_co_rx_path(UINT16 handle, UINT8 app_id)
void bta_pan_co_tx_write(UINT16 handle, UINT8 app_id, BD_ADDR src, BD_ADDR dst, UINT16 protocol, UINT8 *p_data,
UINT16 len, BOOLEAN ext, BOOLEAN forward)
{
- LOGD("bta_pan_co_tx_write not used");
+ ALOGD("bta_pan_co_tx_write not used");
}
@@ -303,7 +303,7 @@ void bta_pan_co_tx_writebuf(UINT16 handle, UINT8 app_id, BD_ADDR src, BD_ADDR d
BOOLEAN ext, BOOLEAN forward)
{
- LOGD("bta_pan_co_tx_writebuf not used");
+ ALOGD("bta_pan_co_tx_writebuf not used");
}
@@ -325,7 +325,7 @@ void bta_pan_co_tx_writebuf(UINT16 handle, UINT8 app_id, BD_ADDR src, BD_ADDR d
void bta_pan_co_rx_flow(UINT16 handle, UINT8 app_id, BOOLEAN enable)
{
- LOGD("bta_pan_co_rx_flow, enabled:%d, not used", enable);
+ ALOGD("bta_pan_co_rx_flow, enabled:%d, not used", enable);
}
@@ -342,7 +342,7 @@ void bta_pan_co_rx_flow(UINT16 handle, UINT8 app_id, BOOLEAN enable)
void bta_pan_co_pfilt_ind(UINT16 handle, BOOLEAN indication, tBTA_PAN_STATUS result,
UINT16 len, UINT8 *p_filters)
{
- LOGD("bta_pan_co_pfilt_ind");
+ ALOGD("bta_pan_co_pfilt_ind");
}
/*******************************************************************************
@@ -358,6 +358,6 @@ void bta_pan_co_mfilt_ind(UINT16 handle, BOOLEAN indication, tBTA_PAN_STATUS res
UINT16 len, UINT8 *p_filters)
{
- LOGD("bta_pan_co_mfilt_ind");
+ ALOGD("bta_pan_co_mfilt_ind");
}
diff --git a/btif/include/btif_common.h b/btif/include/btif_common.h
index 5613004..8e5c275 100644
--- a/btif/include/btif_common.h
+++ b/btif/include/btif_common.h
@@ -70,7 +70,7 @@
** Constants & Macros
************************************************************************************/
-#define ASSERTC(cond, msg, val) if (!(cond)) {LOGE("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);}
+#define ASSERTC(cond, msg, val) if (!(cond)) {ALOGE("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);}
/* Calculate start of event enumeration; id is top 8 bits of event */
#define BTIF_SIG_START(id) ((id) << 8)
@@ -90,7 +90,7 @@ extern bt_callbacks_t *bt_hal_cbacks;
#define HAL_CBACK(P_CB, P_CBACK, ...)\
if (P_CB && P_CB->P_CBACK) { \
- LOGD("HAL %s->%s", #P_CB, #P_CBACK); \
+ ALOGD("HAL %s->%s", #P_CB, #P_CBACK); \
P_CB->P_CBACK(__VA_ARGS__); \
} \
else { \
diff --git a/btif/include/btif_sock_util.h b/btif/include/btif_sock_util.h
index b76bb6f..7a7cff3 100644
--- a/btif/include/btif_sock_util.h
+++ b/btif/include/btif_sock_util.h
@@ -70,13 +70,13 @@ static inline void lock_slot(pthread_mutex_t* mutex)
{
if(mutex->value)
pthread_mutex_lock(mutex);
- else LOGE("mutex: %p is not initialized", mutex);
+ else ALOGE("mutex: %p is not initialized", mutex);
}
static inline void unlock_slot(pthread_mutex_t* mutex)
{
if(mutex->value)
pthread_mutex_unlock(mutex);
- else LOGE("mutex: %p is not initialized", mutex);
+ else ALOGE("mutex: %p is not initialized", mutex);
}
void dump_bin(const char* title, const char* data, int size);
int sock_send_fd(int sock_fd, const uint8_t* buffer, int len, int send_fd);
diff --git a/btif/src/bluetooth.c b/btif/src/bluetooth.c
index 8e4ed0e..b6cbc39 100644
--- a/btif/src/bluetooth.c
+++ b/btif/src/bluetooth.c
@@ -131,7 +131,7 @@ static uint8_t interface_ready(void)
static int init(bt_callbacks_t* callbacks )
{
- LOGI("init");
+ ALOGI("init");
/* sanity check */
if (interface_ready() == TRUE)
@@ -150,7 +150,7 @@ static int init(bt_callbacks_t* callbacks )
static int enable( void )
{
- LOGI("enable");
+ ALOGI("enable");
/* sanity check */
if (interface_ready() == FALSE)
@@ -320,7 +320,7 @@ static int ssp_reply(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t variant,
static const void* get_profile_interface (const char *profile_id)
{
- LOGI("get_profile_interface %s", profile_id);
+ ALOGI("get_profile_interface %s", profile_id);
/* sanity check */
if (interface_ready() == FALSE)
diff --git a/btif/src/btif_av.c b/btif/src/btif_av.c
index 512ae61..80bee96 100755
--- a/btif/src/btif_av.c
+++ b/btif/src/btif_av.c
@@ -176,7 +176,7 @@ const char *dump_av_sm_state_name(btif_av_state_t state)
const char *dump_av_sm_event_name(btif_av_sm_event_t event)
{
- switch(event)
+ switch((int)event)
{
CASE_RETURN_STR(BTA_AV_ENABLE_EVT)
CASE_RETURN_STR(BTA_AV_REGISTER_EVT)
diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c
index 42caf95..0b0734e 100755
--- a/btif/src/btif_core.c
+++ b/btif/src/btif_core.c
@@ -489,7 +489,7 @@ bt_status_t btif_enable_bluetooth(void)
if (btif_core_state != BTIF_CORE_STATE_DISABLED)
{
- LOGD("not disabled\n");
+ ALOGD("not disabled\n");
return BT_STATUS_DONE;
}
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index 818085f..265a834 100755
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -671,7 +671,7 @@ static void btif_dm_ssp_cfm_req_evt(tBTA_DM_SP_CFM_REQ *p_ssp_cfm_req)
cod = devclass2uint(p_ssp_cfm_req->dev_class);
if ( cod == 0) {
- LOGD("cod is 0, set as unclassified");
+ ALOGD("cod is 0, set as unclassified");
cod = COD_UNCLASSIFIED;
}
@@ -700,7 +700,7 @@ static void btif_dm_ssp_key_notif_evt(tBTA_DM_SP_KEY_NOTIF *p_ssp_key_notif)
cod = devclass2uint(p_ssp_key_notif->dev_class);
if ( cod == 0) {
- LOGD("cod is 0, set as unclassified");
+ ALOGD("cod is 0, set as unclassified");
cod = COD_UNCLASSIFIED;
}
@@ -865,7 +865,7 @@ static void btif_dm_search_devices_evt (UINT16 event, char *p_param)
cod = devclass2uint (p_search_data->inq_res.dev_class);
if ( cod == 0) {
- LOGD("cod is 0, set as unclassified");
+ ALOGD("cod is 0, set as unclassified");
cod = COD_UNCLASSIFIED;
}
diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c
index 7ee7215..c6fd378 100755
--- a/btif/src/btif_hh.c
+++ b/btif/src/btif_hh.c
@@ -317,7 +317,7 @@ void btif_hh_remove_device(bt_bdaddr_t bd_addr)
btif_hh_device_t *p_dev;
btif_hh_added_device_t *p_added_dev;
- LOGI("%s: bda = %02x:%02x:%02x:%02x:%02x:%02x", __FUNCTION__,
+ ALOGI("%s: bda = %02x:%02x:%02x:%02x:%02x:%02x", __FUNCTION__,
bd_addr.address[0], bd_addr.address[1], bd_addr.address[2], bd_addr.address[3], bd_addr.address[4], bd_addr.address[5]);
for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
@@ -687,7 +687,7 @@ static void btif_hh_upstreams_evt(UINT16 event, char* p_param)
return;
}
if (p_dev->fd < 0) {
- LOGE("BTA_HH_GET_DSCP_EVT: Error, failed to find the bthid driver...");
+ ALOGE("BTA_HH_GET_DSCP_EVT: Error, failed to find the bthid driver...");
return;
}
{
@@ -791,7 +791,7 @@ static void btif_hh_upstreams_evt(UINT16 event, char* p_param)
break;
case BTA_HH_API_ERR_EVT :
- LOGI("BTA_HH API_ERR");
+ ALOGI("BTA_HH API_ERR");
break;
@@ -1044,7 +1044,7 @@ static bt_status_t set_info (bt_bdaddr_t *bd_addr, bthh_hid_info_t hid_info )
dscp_info.descriptor.dsc_list = (UINT8 *) GKI_getbuf(dscp_info.descriptor.dl_len);
if (dscp_info.descriptor.dsc_list == NULL)
{
- LOGE("%s: Failed to allocate DSCP for CB", __FUNCTION__);
+ ALOGE("%s: Failed to allocate DSCP for CB", __FUNCTION__);
return BT_STATUS_FAIL;
}
memcpy(dscp_info.descriptor.dsc_list, &(hid_info.dsc_list), hid_info.dl_len);
@@ -1237,7 +1237,7 @@ static bt_status_t get_report (bt_bdaddr_t *bd_addr, bthh_report_type_t reportTy
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
return BT_STATUS_FAIL;
}
- else if (reportType <= BTA_HH_RPTT_RESRV || reportType > BTA_HH_RPTT_FEATURE) {
+ else if ( ((int) reportType) <= BTA_HH_RPTT_RESRV || ((int) reportType) > BTA_HH_RPTT_FEATURE) {
BTIF_TRACE_ERROR6(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
return BT_STATUS_FAIL;
@@ -1282,7 +1282,7 @@ static bt_status_t set_report (bt_bdaddr_t *bd_addr, bthh_report_type_t reportTy
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
return BT_STATUS_FAIL;
}
- else if (reportType <= BTA_HH_RPTT_RESRV || reportType > BTA_HH_RPTT_FEATURE) {
+ else if ( ( (int) reportType) <= BTA_HH_RPTT_RESRV || ( (int) reportType) > BTA_HH_RPTT_FEATURE) {
BTIF_TRACE_ERROR6(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
return BT_STATUS_FAIL;
@@ -1308,7 +1308,7 @@ static bt_status_t set_report (bt_bdaddr_t *bd_addr, bthh_report_type_t reportTy
memset(hexbuf, 0, 200);
//TODO
hex_bytes_filled = ascii_2_hex(report, len, hexbuf);
- LOGI("Hex bytes filled, hex value: %d", hex_bytes_filled);
+ ALOGI("Hex bytes filled, hex value: %d", hex_bytes_filled);
if (hex_bytes_filled) {
UINT8* pbuf_data;
@@ -1410,7 +1410,7 @@ static void cleanup( void )
btif_hh_cb.status = BTIF_HH_DISABLING;
for (i = 0; i < BTIF_HH_MAX_HID; i++) {
p_dev = &btif_hh_cb.devices[i];
- if (p_dev->dev_status != BTIF_HH_DEV_UNKNOWN && p_dev->fd >= 0) {
+ if (p_dev->dev_status != BTHH_CONN_STATE_UNKNOWN && p_dev->fd >= 0) {
BTIF_TRACE_DEBUG2("%s: Closing bthid.ko fd = %d", __FUNCTION__, p_dev->fd);
close(p_dev->fd);
p_dev->fd = -1;
diff --git a/btif/src/btif_hl.c b/btif/src/btif_hl.c
index 2b2ed14..5c3ed84 100755
--- a/btif/src/btif_hl.c
+++ b/btif/src/btif_hl.c
@@ -1989,7 +1989,7 @@ static void btif_hl_proc_dereg_cfm(tBTA_HL *p_data)
{
btif_hl_app_cb_t *p_acb;
UINT8 app_idx;
- int app_id;
+ int app_id = 0;
bthl_app_reg_state_t state = BTHL_APP_REG_STATE_DEREG_SUCCESS;
BTIF_TRACE_DEBUG3("%s de-reg status=%d app_handle=%d", __FUNCTION__, p_data->dereg_cfm.status, p_data->dereg_cfm.app_handle);
@@ -2401,7 +2401,7 @@ static BOOLEAN btif_hl_proc_sdp_query_cfm(tBTA_HL *p_data){
btif_hl_mcl_cb_t *p_mcb;
tBTA_HL_SDP *p_sdp;
tBTA_HL_CCH_OPEN_PARAM open_param;
- UINT8 app_idx, mcl_idx, sdp_idx;
+ UINT8 app_idx, mcl_idx, sdp_idx = 0;
UINT8 num_recs, i, num_mdeps, j;
btif_hl_cch_op_t old_cch_oper;
BOOLEAN status =FALSE;
diff --git a/btif/src/btif_pan.c b/btif/src/btif_pan.c
index 1aa882b..8484bb8 100644
--- a/btif/src/btif_pan.c
+++ b/btif/src/btif_pan.c
@@ -101,11 +101,11 @@
#include <cutils/log.h>
-#define info(fmt, ...) LOGI ("btif_pan: %s(L%d): " fmt,__FUNCTION__, __LINE__, ## __VA_ARGS__)
-#define debug(fmt, ...) LOGD ("btif_pan: %s(L%d): " fmt,__FUNCTION__, __LINE__, ## __VA_ARGS__)
-#define warn(fmt, ...) LOGW ("btif_pan: ## WARNING : %s(L%d): " fmt "##",__FUNCTION__, __LINE__, ## __VA_ARGS__)
-#define error(fmt, ...) LOGE ("btif_pan: ## ERROR : %s(L%d): " fmt "##",__FUNCTION__, __LINE__, ## __VA_ARGS__)
-#define asrt(s) if(!(s)) LOGE ("btif_pan: ## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define info(fmt, ...) ALOGI ("btif_pan: %s(L%d): " fmt,__FUNCTION__, __LINE__, ## __VA_ARGS__)
+#define debug(fmt, ...) ALOGD ("btif_pan: %s(L%d): " fmt,__FUNCTION__, __LINE__, ## __VA_ARGS__)
+#define warn(fmt, ...) ALOGW ("btif_pan: ## WARNING : %s(L%d): " fmt "##",__FUNCTION__, __LINE__, ## __VA_ARGS__)
+#define error(fmt, ...) ALOGE ("btif_pan: ## ERROR : %s(L%d): " fmt "##",__FUNCTION__, __LINE__, ## __VA_ARGS__)
+#define asrt(s) if(!(s)) ALOGE ("btif_pan: ## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
@@ -463,7 +463,7 @@ int btpan_tap_send(int tap_fd, const BD_ADDR src, const BD_ADDR dst, UINT16 prot
memcpy(packet, &eth_hdr, sizeof(tETH_HDR));
if(len > 2000)
{
- LOGE("btpan_tap_send eth packet size:%d is exceeded limit!", len);
+ ALOGE("btpan_tap_send eth packet size:%d is exceeded limit!", len);
return -1;
}
memcpy(packet + sizeof(tETH_HDR), buf, len);
@@ -639,7 +639,7 @@ static void bta_pan_callback_transfer(UINT16 event, char *p_param)
{
btpan_conn_t* conn = btpan_find_conn_handle(p_data->close.handle);
- LOGI("%s: event = BTA_PAN_CLOSE_EVT handle %d", __FUNCTION__, p_data->close.handle);
+ ALOGI("%s: event = BTA_PAN_CLOSE_EVT handle %d", __FUNCTION__, p_data->close.handle);
if(conn && conn->handle >= 0)
{
diff --git a/btif/src/btif_rc.c b/btif/src/btif_rc.c
index a3f631a..248696a 100755
--- a/btif/src/btif_rc.c
+++ b/btif/src/btif_rc.c
@@ -486,7 +486,7 @@ BOOLEAN btif_rc_get_connected_peer(BD_ADDR peer_addr)
/* clear the queued PLAY command. if bSend is TRUE, forward to app */
void btif_rc_check_handle_pending_play (BD_ADDR peer_addr, BOOLEAN bSendToApp)
{
- LOGV("btapp_rc_check_handle_pending_play: bSendToApp=%d", bSendToApp);
+ ALOGV("btapp_rc_check_handle_pending_play: bSendToApp=%d", bSendToApp);
if (btif_rc_cb.rc_pending_play)
{
if (bSendToApp)
diff --git a/btif/src/btif_sock.c b/btif/src/btif_sock.c
index 816d4e3..a687553 100644
--- a/btif/src/btif_sock.c
+++ b/btif/src/btif_sock.c
@@ -68,10 +68,10 @@
#include "btif_sock_thread.h"
#include "btif_sock_rfc.h"
#include <cutils/log.h>
-#define info(fmt, ...) LOGI ("btif_sock: %s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define debug(fmt, ...) LOGD ("btif_sock: %s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define error(fmt, ...) LOGE ("btif_sock: ## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
-#define asrt(s) if(!(s)) LOGE ("btif_sock: ## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define info(fmt, ...) ALOGI ("btif_sock: %s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define debug(fmt, ...) ALOGD ("btif_sock: %s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define error(fmt, ...) ALOGE ("btif_sock: ## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
+#define asrt(s) if(!(s)) ALOGE ("btif_sock: ## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
static bt_status_t btsock_listen(btsock_type_t type, const char* service_name,
const uint8_t* uuid, int channel, int* sock_fd, int flags);
diff --git a/btif/src/btif_sock_rfc.c b/btif/src/btif_sock_rfc.c
index b921f90..92f59df 100644
--- a/btif/src/btif_sock_rfc.c
+++ b/btif/src/btif_sock_rfc.c
@@ -85,11 +85,11 @@
#include <cutils/log.h>
#include <hardware/bluetooth.h>
-#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define warn(fmt, ...) LOGW ("## WARNING : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
-#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
-#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define warn(fmt, ...) ALOGW ("## WARNING : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
+#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
+#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
extern void uuid_to_string(bt_uuid_t *p_uuid, char *str);
@@ -97,7 +97,7 @@ static inline void logu(const char* title, const uint8_t * p_uuid)
{
char uuids[128];
uuid_to_string((bt_uuid_t*)p_uuid, uuids);
- LOGD("%s: %s", title, uuids);
+ ALOGD("%s: %s", title, uuids);
}
diff --git a/btif/src/btif_sock_sdp.c b/btif/src/btif_sock_sdp.c
index b2553e0..5fb6c34 100644
--- a/btif/src/btif_sock_sdp.c
+++ b/btif/src/btif_sock_sdp.c
@@ -81,10 +81,10 @@
#include "../bta/pb/bta_pbs_int.h"
#include "../include/bta_op_api.h"
#include <cutils/log.h>
-#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
-#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
+#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
diff --git a/btif/src/btif_sock_thread.c b/btif/src/btif_sock_thread.c
index 4229f04..85690c3 100644
--- a/btif/src/btif_sock_thread.c
+++ b/btif/src/btif_sock_thread.c
@@ -88,10 +88,10 @@
#include "btif_sock_util.h"
#include <cutils/log.h>
-#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
-#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
+#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
#define print_events(events) do { \
debug("print poll event:%x", events); \
if (events & POLLIN) debug( " POLLIN "); \
diff --git a/btif/src/btif_sock_util.c b/btif/src/btif_sock_util.c
index e16cf9a..7ca30b6 100644
--- a/btif/src/btif_sock_util.c
+++ b/btif/src/btif_sock_util.c
@@ -97,10 +97,10 @@
#include <cutils/log.h>
-#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
-#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
+#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__)
+#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
int sock_send_all(int sock_fd, const uint8_t* buf, int len)
@@ -222,7 +222,7 @@ void dump_bin(const char* title, const char* data, int size)
char *line;
int i, j, addr;
const int width = 16;
- LOGD("%s, size:%d, dump started {", title, size);
+ ALOGD("%s, size:%d, dump started {", title, size);
if(size <= 0)
return;
//write offset
@@ -290,6 +290,6 @@ void dump_bin(const char* title, const char* data, int size)
//output the line
PRINT(line_buff);
}
- LOGD("%s, size:%d, dump ended }", title, size);
+ ALOGD("%s, size:%d, dump ended }", title, size);
}
diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c
index ea233b1..e20db60 100755
--- a/btif/src/btif_storage.c
+++ b/btif/src/btif_storage.c
@@ -722,7 +722,7 @@ int btif_in_load_hid_info_iter_cb(char *key, char *value, void *userdata)
dscp_info.descriptor.dsc_list = (UINT8 *) GKI_getbuf(dscp_info.descriptor.dl_len);
if (dscp_info.descriptor.dsc_list == NULL)
{
- LOGE("%s: Failed to allocate DSCP for CB", __FUNCTION__);
+ ALOGE("%s: Failed to allocate DSCP for CB", __FUNCTION__);
return BT_STATUS_FAIL;
}
for (i = 0; i < dscp_info.descriptor.dl_len; i++)
@@ -1744,14 +1744,14 @@ bt_status_t btif_storage_load_autopair_device_list()
if (ret < 0)
{
- LOGE("%s: Failed to create dynamic auto pair blacklist", __FUNCTION__);
+ ALOGE("%s: Failed to create dynamic auto pair blacklist", __FUNCTION__);
return BT_STATUS_FAIL;
}
fp = fopen (BTIF_AUTO_PAIR_CONF_FILE, "r");
if (fp == NULL)
{
- LOGE("%s: Failed to open auto pair blacklist conf file at %s", __FUNCTION__,BTIF_AUTO_PAIR_CONF_FILE );
+ ALOGE("%s: Failed to open auto pair blacklist conf file at %s", __FUNCTION__,BTIF_AUTO_PAIR_CONF_FILE );
return BT_STATUS_FAIL;
}