<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p><br>
</p>
<p>the storage in hash table is not an array. Only loading at the
beginning with array flag will set the proper size key.
Afterwards, if you change the keys, the size is not updated unless
you do it manually.</p>
<p><br>
</p>
<p>Maybe you can provide more details about what you want to achieve
and we can provide hints on that direction.</p>
<p><br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 31/08/16 00:16, Fabian Borot wrote:<br>
</div>
<blockquote
cite="mid:SN2PR0601MB718B0ABE6DF036FC80E72F5CDE00@SN2PR0601MB718.namprd06.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi, I am using htable module with version 4.4 storing
multiple values in the same key (I set the key_type = 1 for
each entry, array key).</p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">I have found </span><span
style="font-size: 12pt;">an issue </span><span
style="font-size: 12pt;">with the htable module. Some keys
show up when using: </span><span style="font-size: 12pt;">"./kamcmd
htable.get my_table key[0]" </span><span style="font-size:
12pt;">but when asking for the "key::size" I says that the
key does not exist. </span></p>
<p><span>Also some entries have the "key::size" entry but the
actual "key[0]" for example is reported as non existent:</span></p>
<p><span><br>
</span></p>
<p><span>See these 2 examples:</span></p>
<p><span><span>Ex:1 "key[0]" is shown but "key::size" is not:</span><br>
</span></p>
<p><span><span><br>
</span></span></p>
<p><span><span></span></span></p>
<div>[root@ar-mia-proxy-01 sbin]# ./kamcmd htable.get
htable_lcrgwA 8[0]</div>
<div>{</div>
<div> item: {</div>
<div> name: 8[0]</div>
<div> value:
555|5875|1.1.1.1|5060|0|4|1|1|Broadvox2010IN</div>
<div> flags: 2</div>
<div> expire: NEVER</div>
<div> }</div>
<div>}</div>
<div>[root@ar-mia-proxy-01 sbin]# ./kamcmd htable.get
htable_lcrgwA 8::size</div>
<div>error: 500 - Key name doesn't exist in htable.</div>
<div><br>
</div>
<p><span><span>Ex2: "key::size" is shown but "key[0]" is not:</span></span></p>
<p><span><span><br>
</span></span></p>
<p><span></span></p>
<div>[root@ar-mia-proxy-01 sbin]# ./kamcmd htable.get
htable_lcrgwA 9[0]</div>
<div>error: 500 - Key name doesn't exist in htable.</div>
<div>[root@ar-mia-proxy-01 sbin]# ./kamcmd htable.get
htable_lcrgwA 9::size</div>
<div>{</div>
<div> item: {</div>
<div> name: 9::size</div>
<div> value: 6</div>
<div> flags: 0</div>
<div> expire: NEVER</div>
<div> }</div>
<div>}</div>
<div><br>
</div>
<p><span>Also, for this case "9::size", supposedly there are 6
entries and in reality there are only 4 in the tables where
I am loading them from</span></p>
<p><span style="font-size: 12pt;">For the case "8::size" that
returns 2 the count </span><span style="font-size: 12pt;">it
is right , the prob is that I can not get the "8[0]" and
"8[1]" keys</span><br>
</p>
<p><span><br>
</span></p>
<p>Any ideas are very appreciated, thank you</p>
<div id="Signature">
<div>
<div> </div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> - <a class="moz-txt-link-freetext" href="http://www.kamailio.org">http://www.kamailio.org</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>