<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Daniel,<br><br>Same it looks like each time:<br><br>Core was generated by `/usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg.diag.2'.<br>Program terminated with signal 11, Segmentation fault.<br>#0 0x00f22633 in ht_db_load_table (ht=0xb60f1af0, dbtable=0xb60f1b00, mode=0)<br> at ht_db.c:244<br>244 kvalue.len = strlen(kvalue.s);<br>(gdb) where<br>#0 0x00f22633 in ht_db_load_table (ht=0xb60f1af0, dbtable=0xb60f1b00, mode=0)<br> at ht_db.c:244<br>#1 0x00f19c12 in ht_db_load_tables () at ht_api.c:643<br>#2 0x00f18545 in mod_init () at htable.c:157<br>#3 0x081043a2 in init_mod (m=0x827ae30) at sr_module.c:872<br>#4 0x0810436a in init_mod (m=0x827aff0) at sr_module.c:852<br>#5 0x0810436a in init_mod (m=0x827b0d0) at sr_module.c:852<br>#6 0x0810436a in init_mod (m=0x827b1b0) at sr_module.c:852<br>#7 0x0810436a in init_mod (m=0x827b290) at sr_module.c:852<br>#8 0x0810436a in init_mod (m=0x827b370) at sr_module.c:852<br>#9 0x081051d3 in init_modules () at sr_module.c:902<br>#10 0x0809b6a5 in main (argc=3, argv=0xbfcc2464) at main.c:2187<br><br><hr id="stopSpelling">Date: Fri, 15 Apr 2011 09:30:02 +0200<br>From: miconda@gmail.com<br>To: sr-users@lists.sip-router.org<br>CC: mrraptor98@hotmail.com<br>Subject: Re: [SR-Users] db_text issue<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
Hello,<br>
<br>
On 4/15/11 5:58 AM, Eric Hiller wrote:
<blockquote cite="mid:BLU166-w1631043E256A79255714A7DBAC0@phx.gbl">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style> I would like to use dbtext to store a list of whitelisted
gateways, but each time I load it I get a core segmentation fault.<br>
<br>
Any ideas? Here is my gateways db file:<br>
key_name(str) key_type(int) value_type(int) key_value(str)<br>
gwip:1:0:a<br>
gwip:1:0:b<br>
gwip:1:0:c<br>
gwcount:0:1:3<br>
<br>
And in my config:<br>
modparam("htable","htable","gateways=>size=4;dbtable=gateways;")<br>
modparam("htable","db_url","text:///usr/local/etc/kamailio")<br>
<br>
while( $var(i) < $sht(gateways=>gwcount) ){<br>
if( $sht(gateways=>gwip[$var(i)]) ==
$si ){<br>
setflag(gateway);<br>
xlog("ISFROMGW: request from IP
$si matches $sht(gateways=>gwip[$var(i)]) ...\n");<br>
}<br>
}<br>
<br>
Do you see anything wrong with this setup?<br>
</blockquote>
do you get a core dump? Send the backtrace if yes.<br>
<br>
Cheers,<br>
Daniel<br>
<pre class="ecxmoz-signature">--
Daniel-Constantin Mierla
<a class="ecxmoz-txt-link-freetext" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a></pre>                                            </body>
</html>