On Tue, 2008-10-28 at 21:07 +0000, Scott Lawrence wrote:
> On Tue, 2008-10-28 at 14:43 -0400, Dale Worley wrote:
> > There is a test in sipxcallresolver.sh{.in} to see if two copies of
> > sipXproxy are running:
> > 
> >    procs=`ps -U dworley`
> >    if expr match "$procs" '.*sipXproxy.*' >/dev/null; then
> >       # At least one sipXproxy is running, check for another one
> >       if expr match "$procs" '.*sipXproxy.*sipXproxy.*' >/dev/null; then
> > 
> > But I've seen it fail in practice: 
> 
> Parsing the output of 'ps' is never a good idea.  It suffers from all
> sorts of portability and line-wrapping problems.
> 
> This strikes me as an example of someone solving a problem that should
> have been solved at a different level altogether.  Rather than a
> configtest check looking for multiple proxies, the call resolver should
> just have data integrity tests on its inputs.

'Tis true.  But making the current hack work better seems to be
straightforward, whereas doing it right would require thought.

Dale


_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to