AmendHub

Download:

jcs

/

wifi_da

/

amendments

/

39

*: Fix WIFI_NETWORK_FLAG_AUTH


jcs made amendment 39 14 days ago
--- wi-fi.h Tue Jan 7 16:52:45 2025 +++ wi-fi.h Tue Jan 7 17:59:45 2025 @@ -104,8 +104,9 @@ struct wifi_network_entry { char rssi; unsigned char channel; unsigned char flags; -#define WIFI_NETWORK_FLAG_AUTH (1 << 1) -#define WIFI_NETWORK_FLAG_HIDDEN (1 << 2) +#define WIFI_NETWORK_FLAG_AUTH (1 << 0) +/* our own flag */ +#define WIFI_NETWORK_FLAG_HIDDEN (1 << 8) char _padding; }; --- window.c Tue Jan 7 17:18:03 2025 +++ window.c Tue Jan 7 17:46:04 2025 @@ -429,10 +429,12 @@ window_mousedown(Point p) menu_r.left + 1, selitem); DeleteMenu((*(wifi_da.ssid_menu))->menuID); - if (hiword(new_net) == 0 || loword(new_net) == selitem) + if (hiword(new_net) == 0 || loword(new_net) == selitem || + loword(new_net) > nwifi_menu_networks) goto menu_done; - net = &wifi_menu_networks[loword(new_net) - 1]; + logger_printf("clicked %s (item %d)", + wifi_menu_networks[loword(new_net) - 1].ssid, loword(new_net)); memset(&wjr, 0, sizeof(wjr)); @@ -568,7 +570,9 @@ window_mousedown(Point p) strlcpy(wjr.key, (char *)password, sizeof(wjr.key)); DisposDialog(dg); - } + } else + logger_printf("network %s does not have auth rssi:%d channel:%d flags:0x%x", + net->ssid, (short)net->rssi, (short)net->channel, (short)net->flags); scsi_wifi_join(wifi_scsi_id, &wjr);