android/health: Fix error messages
PATCH 1/3 android/health: Fix error messages
--- android/health.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
android/health.c +13 -13
@@ -661,7 +661,7 @@ static int update_sdp_record(struct health_app *app) goto fail;if (bt_adapter_add_record (rec,SVC_HINT_HEALTH ) <0 ) { -error ("Failed to register HEALTH record" ); +error ("health: Failed to register HEALTH record" ); goto fail; }
@@ -841,7 +841,7 @@ static void bt_health_mdep_cfg_data(const void *buf, uint16_t len)* multile MDEP configurations ? */ if (update_sdp_record (app) <0 ) { -error ("Error creating HDP SDP record" ); +error ("health: HDP SDP record preparation failed" ); status =HAL_STATUS_FAILED ; goto fail; }
@@ -1105,7 +1105,7 @@ static void create_mdl_cb(struct mcap_mdl *mdl, uint8_t type, GError *gerr,*/ if (channel->type != type) {/* TODO: abort mdl */ -error ("abort, channel-type requested %d, preferred %d not same" , +error ("health: channel type requested %d preferred %d not same" , channel->type, type); goto fail; }
@@ -1261,7 +1261,7 @@ static void create_mcl_cb(struct mcap_mcl *mcl, GError *err, gpointer data)DBG ("" );if (err) { -error ("error creating MCL : %s" , err->message); +error ("health: error creating MCL : %s" , err->message); goto fail; }
@@ -1269,7 +1269,7 @@ static void create_mcl_cb(struct mcap_mcl *mcl, GError *err, gpointer data) channel->dev->mcl =mcap_mcl_ref (mcl); channel->dev->mcl_conn = true; -DBG ("MCL connected" ); +info ("MCL connected" ); ret = mcap_mcl_set_cb(channel->dev->mcl, channel, &gerr, MCAP_MDL_CB_CONNECTED, mcap_mdl_connected_cb,
@@ -1280,7 +1280,7 @@ static void create_mcl_cb(struct mcap_mcl *mcl, GError *err, gpointer data)MCAP_MDL_CB_REMOTE_RECONN_REQ , mcap_mdl_reconn_req_cb, MCAP_MDL_CB_INVALID);if (!ret) { -error ("error setting mdl callbacks on mcl" ); +error ("health: error setting mdl callbacks on mcl" );if (gerr)g_error_free (gerr);
@@ -1307,23 +1307,23 @@ static void search_cb(sdp_list_t *recs, int err, gpointer data)DBG ("" );if (err <0 || !recs) { -error ("Error getting remote SDP records" ); +error ("health: Error getting remote SDP records" ); goto fail; }if (get_ccpsm (recs, &channel->dev->ccpsm) <0 ) { -error ("Can't get remote PSM for control channel" ); +error ("health: Can't get remote PSM for control channel" ); goto fail; }if (get_dcpsm (recs, &channel->dev->dcpsm) <0 ) { -error ("Can't get remote PSM for data channel" ); +error ("health: Can't get remote PSM for data channel" ); goto fail; }if (!mcap_create_mcl (mcap, &channel->dev->dst, channel->dev->ccpsm, create_mcl_cb, channel,NULL , &gerr)) { -error ("error creating mcl %s" , gerr->message); +error ("health: error creating mcl %s" , gerr->message);if (gerr)g_error_free (gerr);
@@ -1478,14 +1478,14 @@ static void bt_health_connect_channel(const void *buf, uint16_t len)if (!queue_length (dev->channels)) {if (channel->type !=CHANNEL_TYPE_RELIABLE ) { -error ("error, first data shannel should be reliable" ); +error ("health: first data shannel should be reliable" ); goto fail; } }if (!dev->mcl) {if (connect_mcl (channel) <0 ) { -error ("health:error retrieving HDP SDP record" ); +error ("health: error retrieving HDP SDP record" ); goto fail; } }else {
@@ -1571,7 +1571,7 @@ bool bt_health_register(struct ipc *ipc, const bdaddr_t *addr, uint8_t mode) NULL, &err);if (!mcap) { -error ("Error creating MCAP instance : %s" , err->message); +error ("health: MCAP instance creation failed %s" , err->message);g_error_free (err);return false; }
Signature · 1 line
1.9.1
PATCH 2/3 android/health: Update PTS results
Update test results for TC_SRC_CC_BV_03_C, TC_SRC_CC_BV_07_C, TC_SNK_CC_BV_04_C, TC_SNK_HCT_BV_01_I and TC_SNK_CC_BV_08_C.
--- android/pts-hdp.txt | 70 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 5 deletions(-)
android/pts-hdp.txt +65 -5
@@ -58,9 +58,34 @@ TC_SRC_CC_BV_01_C PASS haltest: when prompted: bluetooth ssp_reply <args> TC_SRC_CC_BV_02_C PASS when prompted: bluetooth ssp_reply <args> -TC_SRC_CC_BV_03_C INC +TC_SRC_CC_BV_03_C PASS haltest: + hl register_application bluez-android Bluez + bluez-hdp health-device-profile 1 + BTHL_MDEP_ROLE_SOURCE 4100 + BTHL_CHANNEL_TYPE_RELIABLE pulse-oximeter + + hl connect_channel <app_id> <bd_addr> + <mdep_cfg_index> + + when prompted: bluetooth ssp_reply <args> + TC_SRC_CC_BV_05_C INC -TC_SRC_CC_BV_07_C INC +TC_SRC_CC_BV_07_C PASS haltest: + hl register_application bluez-android Bluez + bluez-hdp health-device-profile 2 + BTHL_MDEP_ROLE_SOURCE 4100 + BTHL_CHANNEL_TYPE_RELIABLE pulse-oximeter + BTHL_MDEP_ROLE_SOURCE 4100 + BTHL_CHANNEL_TYPE_STREAMING pulse-oximeter + + hl connect_channel <app_id> <bd_addr> + <mdep_cfg_index> + + when prompted: bluetooth ssp_reply <args> + + when prompted: + hl connect_channel <app_id> <bd_addr> + <mdep_cfg_index> TC_SRC_CC_BV_09_C INC TC_SRC_CC_BI_12_C INC TC_SRC_HCT_BV_01_I INC
@@ -113,12 +138,47 @@ TC_SNK_CC_BV_01_C PASS haltest: when prompted: bluetooth ssp_reply <args> TC_SNK_CC_BV_02_C PASS when prompted: bluetooth ssp_reply <args> -TC_SNK_CC_BV_04_C INC +TC_SNK_CC_BV_04_C PASS haltest: + hl register_application bluez-android Bluez + bluez-hdp health-device-profile 1 + BTHL_MDEP_ROLE_SINK 4100 + BTHL_CHANNEL_TYPE_RELIABLE pulse-oximeter + + hl connect_channel <app_id> <bd_addr> + <mdep_cfg_index> + + when prompted: bluetooth ssp_reply <args> + TC_SNK_CC_BV_06_C INC -TC_SNK_CC_BV_08_C INC +TC_SNK_CC_BV_08_C PASS haltest: + hl register_application bluez-android Bluez + bluez-hdp health-device-profile 2 + BTHL_MDEP_ROLE_SINK 4100 + BTHL_CHANNEL_TYPE_RELIABLE pulse-oximeter + BTHL_MDEP_ROLE_SINK 4100 + BTHL_CHANNEL_TYPE_STREAMING pulse-oximeter + + hl connect_channel <app_id> <bd_addr> + <mdep_cfg_index> + + when prompted: bluetooth ssp_reply <args> + + when prompted: + hl connect_channel <app_id> <bd_addr> + <mdep_cfg_index> + TC_SNK_CC_BV_10_C INC TC_SNK_CC_BI_11_C INC -TC_SNK_HCT_BV_01_I INC +TC_SNK_HCT_BV_01_I PASS haltest: + hl register_application bluez-android Bluez + bluez-hdp health-device-profile 1 + BTHL_MDEP_ROLE_SINK 4100 + BTHL_CHANNEL_TYPE_RELIABLE pulse-oximeter + + hl connect_channel <app_id> <bd_addr> + <mdep_cfg_index> + + when prompted: bluetooth ssp_reply <args> TC_SNK_HCT_BV_02_I INC TC_SNK_HCT_BV_03_I N/A TC_SNK_HCT_BV_04_I INC
Signature · 1 line
1.9.1
PATCH 3/3 android/client: Fix coding style
In reply to Ravi kumar Veeramally--- android/client/if-hl.c | 10 +++++----- android/client/if-rc.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-)
android/client/if-hl.c +5 -5
@@ -15,12 +15,12 @@* */ -#include <stdio.h> -#include <ctype.h> -#include <unistd.h> +#include <stdio.h> +#include <ctype.h> +#include <unistd.h> -#include <hardware/bluetooth.h> -#include <hardware/bt_hl.h> +#include <hardware/bluetooth.h> +#include <hardware/bt_hl.h> #include "if-main.h" #include "pollhandler.h"
android/client/if-rc.c +4 -4
@@ -15,11 +15,11 @@* */ -#include <stdio.h> -#include <ctype.h> +#include <stdio.h> +#include <ctype.h> -#include <hardware/bluetooth.h> -#include <hardware/bt_hh.h> +#include <hardware/bluetooth.h> +#include <hardware/bt_hh.h> #include "if-main.h" #include "pollhandler.h"
Signature · 1 line
1.9.1