Skip Menu |

This queue is for tickets about the Device-Gsm CPAN distribution.

Report information
The Basics
Id: 22025
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Device-Gsm

People
Owner: cosimo [...] cpan.org
Requestors: dellr [...] mac.nospam.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.43
Fixed in: (no value)



Subject: Signal strength is parsed incorrectly
In the function signal_quality(), the module parses the result depending on the amount of information it gets from the request. There is a place where the function does a if( $dBm =~ /\+CSQ:\s*(\d+)/ ) { #block 1... }elsif( $dBm =~ /\+CSQ:\s*(\d+),(\d+)/ ) { #block 2... } It's obvious that block 2 will never be executed since pattern matching is greedy. The fix would be to switch the two parts around so it tries to match the more complex example first.
Development version of Device::Gsm (soon to be v1.45) will have this modify. Thanks for reporting.