فهرست منبع

update: wlan创建AP时,出错才打印日志

Wendal Chen 2 سال پیش
والد
کامیت
3782d7a31f
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      components/wlan/luat_lib_wlan.c

+ 4 - 2
components/wlan/luat_lib_wlan.c

@@ -364,7 +364,8 @@ static int l_wlan_ap_start(lua_State *L) {
     memcpy(apinfo.password, password, password_len);
 
     int ret = luat_wlan_ap_start(&apinfo);
-    LLOGD("apstart ret %d", ret);
+    if (ret)
+        LLOGD("apstart ret %d", ret);
     lua_pushboolean(L, ret == 0 ? 1 : 0);
     return 1;
 }
@@ -378,7 +379,8 @@ wlan.stopAP()
 */
 static int l_wlan_ap_stop(lua_State *L) {
     int ret = luat_wlan_ap_stop();
-    LLOGD("apstop ret %d", ret);
+    if (ret)
+        LLOGD("apstop ret %d", ret);
     lua_pushboolean(L, ret == 0 ? 1 : 0);
     return 1;
 }