summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Linux_x86/phOsalNfc.c1
-rw-r--r--src/phFriNfc_OvrHal.c5
-rw-r--r--src/phHal4Nfc_ADD.c13
3 files changed, 13 insertions, 6 deletions
diff --git a/Linux_x86/phOsalNfc.c b/Linux_x86/phOsalNfc.c
index a158415..e906b0d 100644
--- a/Linux_x86/phOsalNfc.c
+++ b/Linux_x86/phOsalNfc.c
@@ -144,6 +144,7 @@ void phOsalNfc_RaiseException(phOsalNfc_ExceptionType_t eExceptionType, uint16_t
{
if(eExceptionType == phOsalNfc_e_UnrecovFirmwareErr)
{
+ ALOGE("HCI Timeout - Exception raised - Force restart of NFC service");
phLibNfc_Mgt_Recovery();
abort();
} else {
diff --git a/src/phFriNfc_OvrHal.c b/src/phFriNfc_OvrHal.c
index 539210e..9efff94 100644
--- a/src/phFriNfc_OvrHal.c
+++ b/src/phFriNfc_OvrHal.c
@@ -323,7 +323,10 @@ static void phFriNfc_OvrHal_CB_Transceive(void *context,
if(NULL != pRecvdata && OvrHal->TranceiveInfo.sRecvData.buffer != NULL && pRecvdata->buffer != NULL)
{
/* Work-around for the NFCIP Tranceive API */
- memcpy(OvrHal->TranceiveInfo.sRecvData.buffer, pRecvdata->buffer, pRecvdata->length);
+ if (OvrHal->TranceiveInfo.sRecvData.buffer != pRecvdata->buffer)
+ {
+ memcpy(OvrHal->TranceiveInfo.sRecvData.buffer, pRecvdata->buffer, pRecvdata->length);
+ }
if (OvrHal->pndef_recv_length != NULL)
{
*OvrHal->pndef_recv_length = (uint16_t) pRecvdata->length;
diff --git a/src/phHal4Nfc_ADD.c b/src/phHal4Nfc_ADD.c
index 0a3303c..727b7c4 100644
--- a/src/phHal4Nfc_ADD.c
+++ b/src/phHal4Nfc_ADD.c
@@ -671,11 +671,14 @@ void phHal4Nfc_TargetDiscoveryComplete(
if(phHal_eNfcIP1_Target ==
Hal4Ctxt->rem_dev_list[Count-1]->RemDevType)
{
- (void)memcpy(
- (void *)Hal4Ctxt->rem_dev_list[0],
- (void *)Hal4Ctxt->rem_dev_list[Count-1],
- sizeof(phHal_sRemoteDevInformation_t)
- );
+ if (Count != 1)
+ {
+ (void)memcpy(
+ (void *)Hal4Ctxt->rem_dev_list[0],
+ (void *)Hal4Ctxt->rem_dev_list[Count-1],
+ sizeof(phHal_sRemoteDevInformation_t)
+ );
+ }
NfcIpDeviceCount = 1;
break;
}