summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2013-03-11 15:21:37 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2013-03-11 15:21:37 +0100
commitcb2626dbdc3dcddc6ef0bfb777f3647eb6f31794 (patch)
treec36589e307fdf417e24d5c53b3d49272732cc8dc /src
parent0ab6e4024b63eedd735cbc6e6174829695915414 (diff)
downloadneard-cb2626dbdc3dcddc6ef0bfb777f3647eb6f31794.tar.gz
neard-cb2626dbdc3dcddc6ef0bfb777f3647eb6f31794.tar.bz2
neard-cb2626dbdc3dcddc6ef0bfb777f3647eb6f31794.zip
ndef: Fix local carrier data fetching error message
Diffstat (limited to 'src')
-rw-r--r--src/ndef.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ndef.c b/src/ndef.c
index 9a6a44a..89cc8c5 100644
--- a/src/ndef.c
+++ b/src/ndef.c
@@ -1778,7 +1778,7 @@ static int near_ndef_prepare_ac_and_cfg_records(enum handover_carrier carrier,
{
struct carrier_data *local_carrier = NULL;
char cdr;
- char *mime_type;
+ char *mime_type, *carrier_string;
uint16_t prop;
int err;
@@ -1790,10 +1790,12 @@ static int near_ndef_prepare_ac_and_cfg_records(enum handover_carrier carrier,
/* to be safe side */
*ac = NULL;
*cfg = NULL;
+ carrier_string = NULL;
switch (carrier) {
case NEAR_CARRIER_BLUETOOTH:
cdr = '0';
+ carrier_string = "Bluetooth";
mime_type = BT_MIME_STRING_2_1;
local_carrier = __near_agent_handover_request_data(
HO_AGENT_BT, remote_carrier);
@@ -1808,6 +1810,7 @@ static int near_ndef_prepare_ac_and_cfg_records(enum handover_carrier carrier,
case NEAR_CARRIER_WIFI:
cdr = '1';
+ carrier_string = "WiFi-WSC";
mime_type = WIFI_WSC_MIME_STRING;
local_carrier = __near_agent_handover_request_data(
HO_AGENT_WIFI, remote_carrier);
@@ -1815,12 +1818,13 @@ static int near_ndef_prepare_ac_and_cfg_records(enum handover_carrier carrier,
case NEAR_CARRIER_EMPTY:
case NEAR_CARRIER_UNKNOWN:
+ carrier_string = "Unkknown";
err = -EINVAL;
goto fail;
}
if (local_carrier == NULL) {
- DBG("Unable to retrieve local carrier bluetooth data");
+ DBG("Unable to retrieve local carrier %s data", carrier_string);
err = -ESRCH;
goto fail;
}