bug reading astguiclient.conf properly
Posted: Thu Oct 05, 2006 9:22 pm
While working on a patch, I found a bug in how AST_CRON_mix_recordings_*.pl and other scripts read astguiclient.conf.
I had added this to astguiclient.conf after the PATHmonitor entry:
in AST_CRON_mix_recordings_*.pl files, i added this after line 68:
The result was that $PATHmonitor got overwritten by $PATHmonitor the next time the loop was run.
Is there a better way to read the .conf file so we can use similar variable names?
My solution was to change the variable name to PATHmon_done, not as intuitive as I'd like.
I had added this to astguiclient.conf after the PATHmonitor entry:
- Code: Select all
PATHmonitor_done => /var/spool/asterisk/monitor/DONE
in AST_CRON_mix_recordings_*.pl files, i added this after line 68:
- Code: Select all
if ( ($line =~ /^PATHmonitor_done/) && ($CLImonitor_done < 1) )
{$PATHmonitor_done = $line; $PATHmonitor_done =~ s/.*=//gi;}
The result was that $PATHmonitor got overwritten by $PATHmonitor the next time the loop was run.
Is there a better way to read the .conf file so we can use similar variable names?
My solution was to change the variable name to PATHmon_done, not as intuitive as I'd like.