[SR-Users] DB select htable:mod-init doesn't work

Sebastian Damm damm at sipgate.de
Thu May 15 12:31:13 CEST 2014


Hi Juha,

you're right, but if that was the problem, we should at least see the
second log line after the sql_query. $var(i) is used only after this.

Any other hints?

Best Regards,
Sebastian


On Thu, May 15, 2014 at 11:44 AM, Juha Heinanen <jh at tutpro.com> wrote:

> Sebastian Damm writes:
>
> > event_route[htable:mod-init] {
> >         xlog("L_NOTICE", "Loading Carrier domains into Hash table.\n");
> >         sql_query("ser", "select domain_name from carrier_domains",
> > "domains");
> >         xlog("L_NOTICE", "Loaded from database...\n");
> >         while($var(i)<$dbr(domains=>cols)) {
> >                 xlog("L_NOTICE", "Entry: $dbr(domains=>[$var(i),0])\n");
> >                 $sht(carrierips=>$var(i)) = $dbr(domains=>[$var(i),0]);
> >                 $var(i) = $var(i) + 1;
> >         }
> > }
>
> i don't see $var(i) initialized.
>
> -- juha
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>


<http://www.sipgate.co.uk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140515/794c8e71/attachment.html>


More information about the sr-users mailing list