summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNagaraj <c_lnun@qca.qualcomm.com>2014-10-17 09:25:27 -0700
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2014-10-20 17:06:25 +0530
commite8b2fab4abdceacefc53b01071d4e5e9c5bec811 (patch)
tree450178f8a8f2b179361bc71d988701c9699a01e7
parent639a03f4c34660ef1e0e5c2f05079da678fd948d (diff)
cnss_diag: Driver message parsing fix.
This fixes the wlan driver logs droppped in cnss_diag. The fix is modification to pre pointer increment. Change-Id: I69e463b98d47dbf3af7d3b0be4808cfeb2375334 CRs-fixed: 741221
-rw-r--r--tools/fwdebuglog/cld-diag-parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/fwdebuglog/cld-diag-parser.c b/tools/fwdebuglog/cld-diag-parser.c
index 3f3f45dd1a73..6a8a115991e0 100644
--- a/tools/fwdebuglog/cld-diag-parser.c
+++ b/tools/fwdebuglog/cld-diag-parser.c
@@ -1124,6 +1124,8 @@ void process_cnss_host_message(tAniNlHdr *wnl, int32_t optionflag,
{
char *wlanLog = (char *)&wnl->wmsg.length + sizeof(wnl->wmsg.length);
char *charCache = NULL ;
+ if (!wlanLog)
+ return;
/* Assuming every kmsg is terminated by a '\n' character,split the
* wlanLog buffer received from the driver and log individual messages
@@ -1151,7 +1153,7 @@ void process_cnss_host_message(tAniNlHdr *wnl, int32_t optionflag,
else if (optionflag & CONSOLE_FLAG) {
android_printf("%s\n", wlanLog);
}
- wlanLog = charCache++;
+ wlanLog = ++charCache;
}
}