[OpenSIPS-Users] How to prevent error when using invalid index on s.select

Brett Nemeroff brett at nemeroff.com
Mon Apr 12 22:29:49 CEST 2010


Hello List,
I'm using s.select to iterate over a list of values. I don't know how
big the list is so I'm going to hit the end and it's going to error
out..

OpenSIPs produces an ERROR on this and I'd like to suppress this
error. I've typically seen this performed in an eval or perhaps by
knowing ahead of time how big the array is (which I don't know).

So is there a right way to do this to not get the error?

Here's what I'm getting:
Apr 12 20:16:37 domU-XX-XX-XX-XX-XX-XX /usr/local/sbin/opensips[2611]:
ERROR:core:eval_elem: invalid string operands
Apr 12 20:16:37 domU-XX-XX-XX-XX-XX-XX /usr/local/sbin/opensips[2611]:
ERROR:core:do_assign: no value in right expression
Apr 12 20:16:37 domU-XX-XX-XX-XX-XX-XX /usr/local/sbin/opensips[2611]:
ERROR:core:do_assign: error at line: 514

Thanks,
Brett



More information about the Users mailing list