From 4aac6d30177e87f52840f19c10f797cf2936fb0f Mon Sep 17 00:00:00 2001 From: zhangsheng Date: Fri, 14 Mar 2025 09:26:28 +0800 Subject: [PATCH] fix wifi bugs --- common/global.hpp | 2 +- jsonparse/web_cmd_parse3.cpp | 2 +- wifi_5g/wpa_client.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/global.hpp b/common/global.hpp index ad8569c..f8b3ec6 100644 --- a/common/global.hpp +++ b/common/global.hpp @@ -18,7 +18,7 @@ enum enumZigBeeTransmitStatus { //#define NR5G_MODULE -#define Q4G_MODULE +//#define Q4G_MODULE //#define WIFI_MODULE //#define NR5G_MEIGE diff --git a/jsonparse/web_cmd_parse3.cpp b/jsonparse/web_cmd_parse3.cpp index e457672..b1cf04f 100644 --- a/jsonparse/web_cmd_parse3.cpp +++ b/jsonparse/web_cmd_parse3.cpp @@ -163,7 +163,7 @@ std::string JsonData::JsonCmd_Cgi_52(Param_52 ¶m) { boost::split(vecSsid, netssid, boost::is_any_of("\n"), boost::token_compress_off); jsBody["type"] = "SCAN"; jsBody["enable"] = true; - zlog_info(zct,"netssid : %s %d", netssid.c_str(), vecSsid.size()); + zlog_info(zct,"netssid : %s === %d", netssid.c_str(), vecSsid.size()); for (unsigned int i = 1; i < vecSsid.size() - 1; i++) { std::vector data; boost::split(data, vecSsid[i], boost::is_any_of("\t"), boost::token_compress_off); diff --git a/wifi_5g/wpa_client.cpp b/wifi_5g/wpa_client.cpp index 913c92e..c54024f 100644 --- a/wifi_5g/wpa_client.cpp +++ b/wifi_5g/wpa_client.cpp @@ -409,8 +409,8 @@ bool WPAClient::Request(WPAContext *context, const std::string &cmd, std::string res = select(wpa_context_->s + 1, &rfds, NULL, NULL, &tv); if (res < 0) return false; if (FD_ISSET(wpa_context_->s, &rfds)) { - char temp[1024] = {0}; - int temp_len = 1024; + char temp[1024 * 3] = {0}; + int temp_len = 1024 * 3; res = recv(wpa_context_->s, temp, temp_len, 0); if (res < 0) return false; if (res > 0 && temp[0] == '<') {