diff options
| author | Robert Pluim | 2019-11-27 10:41:32 +0100 |
|---|---|---|
| committer | Robert Pluim | 2019-11-28 09:41:28 +0100 |
| commit | b05aa8d742d80aeb692c54289e8ccb074a68bf51 (patch) | |
| tree | 039d002db29ac1cacac44fa5def51b5440e4e337 | |
| parent | 25d4bf4fe0f0765f04404399b50cda91e827315e (diff) | |
| download | emacs-b05aa8d742d80aeb692c54289e8ccb074a68bf51.tar.gz emacs-b05aa8d742d80aeb692c54289e8ccb074a68bf51.zip | |
Support wlan in network-interface-list on pre-Vista Windows
* src/w32.c (network_interface_list): Check for 'Wireless' in
adapter description to support pre-Vista Windows.
| -rw-r--r-- | src/w32.c | 19 |
1 files changed, 17 insertions, 2 deletions
| @@ -9540,8 +9540,23 @@ network_interface_list (bool full, unsigned short match) | |||
| 9540 | switch (adapter->IfType) | 9540 | switch (adapter->IfType) |
| 9541 | { | 9541 | { |
| 9542 | case IF_TYPE_ETHERNET_CSMACD: | 9542 | case IF_TYPE_ETHERNET_CSMACD: |
| 9543 | ifmt_idx = ETHERNET; | 9543 | /* Windows before Vista reports wireless adapters as |
| 9544 | if_num = eth_count++; | 9544 | Ethernet. Work around by looking at the Description |
| 9545 | string. */ | ||
| 9546 | { | ||
| 9547 | char description[MAX_UTF8_PATH]; | ||
| 9548 | if (filename_from_utf16 (adapter->Description, description) == 0 | ||
| 9549 | && strstr (description, "Wireless ")) | ||
| 9550 | { | ||
| 9551 | ifmt_idx = WLAN; | ||
| 9552 | if_num = wlan_count++; | ||
| 9553 | } | ||
| 9554 | else | ||
| 9555 | { | ||
| 9556 | ifmt_idx = ETHERNET; | ||
| 9557 | if_num = eth_count++; | ||
| 9558 | } | ||
| 9559 | } | ||
| 9545 | break; | 9560 | break; |
| 9546 | case IF_TYPE_ISO88025_TOKENRING: | 9561 | case IF_TYPE_ISO88025_TOKENRING: |
| 9547 | ifmt_idx = TOKENRING; | 9562 | ifmt_idx = TOKENRING; |