Browse Source

update: 统一hostname的命名

Wendal Chen 2 years ago
parent
commit
7b3bbb885b
2 changed files with 3 additions and 2 deletions
  1. 2 1
      app/network/luat_wlan_air101.c
  2. 1 1
      src/network/lwip2.1.3/netif/ethernetif.c

+ 2 - 1
app/network/luat_wlan_air101.c

@@ -40,7 +40,7 @@ static int l_wlan_cb(lua_State*L, void* ptr) {
     {
     case NETIF_IP_NET_UP:
         luat_wlan_get_ip(0, sta_ip);
-        LLOGD("IP_EVENT_STA_GOT_IP %s", sta_ip);
+        LLOGD("sta ip %s", sta_ip);
         lua_pushstring(L, "IP_READY");
         lua_pushstring(L, sta_ip);
         lua_pushinteger(L, NW_ADAPTER_INDEX_LWIP_WIFI_STA);
@@ -72,6 +72,7 @@ static int l_wlan_cb(lua_State*L, void* ptr) {
 
 static void netif_event_cb(u8 status) {
     rtos_msg_t msg = {0};
+    LLOGD("netif_event %d", status);
     msg.handler = l_wlan_cb;
 	switch (status)
     {

+ 1 - 1
src/network/lwip2.1.3/netif/ethernetif.c

@@ -374,7 +374,7 @@ ethernetif_init(struct netif *netif)
     u8* mac_addr = wpa_supplicant_get_mac();
 #if LWIP_NETIF_HOSTNAME
 	/* Initialize interface hostname */
-    sprintf(host_name, "LOS_%02X%02X%02X%02X%02X%02X", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
+    sprintf(host_name, "LUATOS_%02X%02X%02X%02X%02X%02X", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
 	netif->hostname = host_name;
 #endif /* LWIP_NETIF_HOSTNAME */