[SR-Users] Htable iterators, am I doing it wrong?
davy van de moere
davy.van.de.moere at gmail.com
Mon Oct 27 15:47:59 CET 2014
I was giving the htable iterator a go , but I can't get it to work.
My relevant config would is:
modparam("htable", "htable", "testhtable=>size=4;")
in the request route I have this:
sht_iterator_start("i1", "testhtable");
while(sht_iterator_next("i1")) {
xlog("L_INFO"," $shtitkey(i1) is: $shtitval(i1)\n");
}
sht_iterator_end("i1");
I added some values to my testhtable:
$ kamcmd htable.dump testhtable
{
entry: 0
size: 2
slot: {
item: {
name: x[0]
value: 1
}
item: {
name: x[1]
value: 1
}
}
}
But when I have something route over that part I get:
Oct 27 15:33:36 kamailio[18828]: INFO: <script>: <null> is: <null>
Oct 27 15:33:36 kamailio[18828]: INFO: <script>: <null> is: <null>
So it is correct to find 2 items in the htable, but for both the key and
value are not found.
Tried it on both 4.2 and master.
Thx!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20141027/44c5af8c/attachment.html>
More information about the sr-users
mailing list