未验证 提交 3002c3a9 编写于 作者: O openharmony_ci 提交者: Gitee

!128 删除多余的打印信息

Merge pull request !128 from fengjiahui4/OpenHarmony-3.0-LTS
...@@ -50,18 +50,6 @@ static pthread_t g_scanThreadId = 0; ...@@ -50,18 +50,6 @@ static pthread_t g_scanThreadId = 0;
static int g_scanAvailable = 0; static int g_scanAvailable = 0;
static int g_Connect = 0; static int g_Connect = 0;
static void DumpString(const char *buf, int len, const char *tag)
{
SAMPLE_INFO("%s dump start.", tag);
for (int i = 0; i < len; i++) {
printf("%c", buf[i]);
}
printf("\n");
printf("\n");
SAMPLE_INFO("%s dump end.", tag);
}
static int StrMatch(const char *a, const char *b) static int StrMatch(const char *a, const char *b)
{ {
return strncmp(a, b, strlen(b)) == 0; return strncmp(a, b, strlen(b)) == 0;
...@@ -85,7 +73,6 @@ static int SendCtrlCommand(const char *cmd, char *reply, size_t *replyLen) ...@@ -85,7 +73,6 @@ static int SendCtrlCommand(const char *cmd, char *reply, size_t *replyLen)
} }
size_t len = *replyLen - 1; size_t len = *replyLen - 1;
wpa_ctrl_request(ctrlConn, cmd, strlen(cmd), reply, &len, 0); wpa_ctrl_request(ctrlConn, cmd, strlen(cmd), reply, &len, 0);
DumpString(reply, len, "SendCtrlCommand raw return");
if (ctrlConn != NULL) { if (ctrlConn != NULL) {
wpa_ctrl_close(ctrlConn); wpa_ctrl_close(ctrlConn);
ctrlConn = NULL; ctrlConn = NULL;
...@@ -150,7 +137,6 @@ int GetCurrentConnInfo(char *ssid, int len) ...@@ -150,7 +137,6 @@ int GetCurrentConnInfo(char *ssid, int len)
printf("[ERROR]GetCurrentConnInfo Command(STATUS) Error \n"); printf("[ERROR]GetCurrentConnInfo Command(STATUS) Error \n");
return -1; return -1;
} }
DumpString(connInfo, infoLen, "connInfo");
printf("[LOG]end the DumpStrint\n"); printf("[LOG]end the DumpStrint\n");
char *pos = strstr(connInfo, "ssid="); char *pos = strstr(connInfo, "ssid=");
if (pos == NULL) { if (pos == NULL) {
...@@ -338,7 +324,6 @@ static void CliRecvPending(void) ...@@ -338,7 +324,6 @@ static void CliRecvPending(void)
if (g_monitorConn != NULL) { if (g_monitorConn != NULL) {
if (wpa_ctrl_recv(g_monitorConn, buf, &len) == 0) { if (wpa_ctrl_recv(g_monitorConn, buf, &len) == 0) {
buf[len] = '\0'; buf[len] = '\0';
SAMPLE_INFO("event received %s", buf);
WifiEventHandler(buf, len); WifiEventHandler(buf, len);
} else { } else {
SAMPLE_INFO("could not read pending message."); SAMPLE_INFO("could not read pending message.");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册