wlan: Fix of batch scan result string format
If previous batch scan response was truncated then subsequent
batch scan results should not start with "####" if it is not
new batch scan list
Change-Id: I6a87118944c8924e27187b1b3ff57e427c367097
CRs-fixed: 575694
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 45c0f5a..99b57b9 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -1381,6 +1381,8 @@
temp_len = snprintf(pTemp, (sizeof(temp) - temp_total_len), "----\n");
pTemp += temp_len;
temp_total_len += temp_len;
+
+ pAdapter->prev_batch_id = 0;
}
if (temp_total_len < rem_len)
@@ -1394,7 +1396,7 @@
pAdapter->isTruncated = TRUE;
if (rem_len >= strlen("%%%%"))
{
- ret = snprintf(pDest, strlen("%%%%"), "%%%%");
+ ret = snprintf(pDest, strlen("%%%%"), "%%%%%%%%");
}
{
ret = 0;
@@ -1431,7 +1433,6 @@
tHddBatchScanRsp *pPrev;
tANI_U32 len;
- pAdapter->prev_batch_id = 0;
pAdapter->isTruncated = FALSE;
/*head of hdd batch scan response queue*/
@@ -5152,6 +5153,7 @@
pAdapter->pBatchScanRsp = NULL;
pAdapter->numScanList = 0;
pAdapter->batchScanState = eHDD_BATCH_SCAN_STATE_STOPPED;
+ pAdapter->prev_batch_id = 0;
mutex_init(&pAdapter->hdd_batch_scan_lock);
#endif