[Bugfix][T106BUG-418]Fix the error IP address reporting by callback function

Only Configure: No
Affected branch: master
Affected module: data
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: Yes

Change-Id: I0cd3eb222702b6ed9fd55f660fe7c09c0ef17313
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
index 489bf64..c22a7bb 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
@@ -129,6 +129,11 @@
     const char addresses_separator[2] = "/";
     const char dnses_separator[2] = " ";
 
+    char buf_ip[64] = {0};
+    char buf_gateway[64] = {0};
+    char buf_pri_dns[64] = {0};
+    char buf_sec_dns[64] = {0};
+
     addresses = libdata->addresses;
     dnses = libdata->dnses;
     //get addresses
@@ -170,8 +175,19 @@
         inet_pton(AF_INET6, tmp_char, &(data_res->v6.sec_dns));
     }
     //get gateway
+    inet_aton(libdata->gateways,&(data_res->v4.gateway));
     inet_pton(AF_INET6,libdata->gateways,&(data_res->v6.gateway));
 
+    LYINFLOG("v4.ip=%s", inet_ntoa(data_res->v4.ip));
+    LYINFLOG("v4.pri_dns=%s", inet_ntoa(data_res->v4.pri_dns));
+    LYINFLOG("v4.sec_dns=%s", inet_ntoa(data_res->v4.sec_dns));
+
+    inet_ntop(AF_INET6, &(data_res->v6.ip), buf_ip, sizeof(buf_ip));
+    inet_ntop(AF_INET6, &(data_res->v6.gateway), buf_gateway, sizeof(buf_gateway));
+    inet_ntop(AF_INET6, &(data_res->v6.pri_dns), buf_pri_dns, sizeof(buf_pri_dns));
+    inet_ntop(AF_INET6, &(data_res->v6.sec_dns), buf_sec_dns, sizeof(buf_sec_dns));
+    LYINFLOG("v6.ip=%s, v6.gateway=%s, v6.pri_dns=%s, v6.sec_dns=%s\n"
+        , buf_ip, buf_gateway, buf_pri_dns, buf_sec_dns);
     return ;
 }
 
@@ -328,9 +344,11 @@
         inet_pton(AF_INET6, tmp_char, &(data_res->v6.addr.sec_dns));
     }
     //get gateway
+    inet_aton(libdata->gateways,&(data_res->v4.addr.gateway));
     inet_pton(AF_INET6,libdata->gateways,&(data_res->v6.addr.gateway));
 
     LYINFLOG("v4.ip=%s", inet_ntoa(data_res->v4.addr.ip));
+    LYINFLOG("ipv4 gateways = %s", inet_ntoa(data_res->v4.addr.gateway));
     LYINFLOG("v4.pri_dns=%s", inet_ntoa(data_res->v4.addr.pri_dns));
     LYINFLOG("v4.sec_dns=%s", inet_ntoa(data_res->v4.addr.sec_dns));