Skip to content

Commit

Permalink
fix: windows wifi scan issue fix for first network (#138)
Browse files Browse the repository at this point in the history
## Description
While scanning for the networks in windows, initially there is a slicing from 5th index which leads to the omitting of first row depicting the ssid of the network.
Have changed the slicing from 4th index, so that all the network information be preserved and assigned correctly.

## Motivation and Context
This change is required as to get the correct information of the first network been captured and utilized.
#137

## Usage examples

## How Has This Been Tested?
After the change, have tried to scan for the networks, and can see all the information for every network is been listed correctly.
Also tried to connect and disconnect with the selected network, which works as expected.

## Types of changes

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Refactorization (non-functional change which improve code readibility)


Co-authored-by: Geetansh Jain <geetansh.jain@siemens.com>
  • Loading branch information
geetanshjain and Geetansh Jain authored Oct 11, 2020
1 parent 9a2a50e commit f6e878d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/windows-scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function scanWifi(config, callback) {
.split('\r')
.join('')
.split('\n')
.slice(5, scanResults.length);
.slice(4, scanResults.length);

var numNetworks = -1;
var currentLine = 0;
Expand Down

0 comments on commit f6e878d

Please sign in to comment.