When ELSA's /opt/elsa/web/cli.pl
returns a warning - it prints to
STDOUT. This throws off the position in the array of th response data is
causing the $sensor variable never to be populated and CAPME to fail
with the - "Failed to find a matching sid..." error message because
the $sensor variable is empty.
This patch will iterate through the response until we find the header
line for the response - and take the next line as the response_data.
I found while stepping through CAPME that ELSA was in fact returning the expected results for when I ran /opt/elsa/web/cli.pl manually
- but it was printing a warning to STDOUT - throwing off the CAPME ELSA script. This patch should address this specific problem. Not a PHP guy - let me know if you notice anything wrong.