[Freeswitch-users] sofia_reg_internal.db growbiggerandbiggeralong with time

Charles fieldpeak at gmail.com
Sat Mar 26 06:06:28 MSK 2011


Hi Anthony,

I tried to delete the db files sofia_reg_* db files, it is the same.

Actually i've located the bug where the source code, when INSERTing the new record to the table sip_authentication(line#801 of sofia_reg.c), 
It compose a wrong SQL statement which caused insert the wrong values ('NULL' at 'profile' column, and 'internal' at hostname column) to columns, consequetnly, failed to delete when expires time arrive.

Please FOCUS here.

the mail below shows the details, 
thanks!

sender: Charles
sent time: 2011-03-25 12:22:57
receiver: FreeSWITCH Users Help; msc; jeff
cc: jonas.gauffin
subject: Re: Re: [Freeswitch-users] sofia_reg_internal.db grow bigger and biggeralong with time

It looks that I found the root cause, at the line#801 of sofia_reg.c, when excute the SQL statement ('INSERT') to the table 'sip_authentication', it wrongly insert as screenshot below, profile_name should be 'internal' and hostname should be 'mypc' (name of my computer).
however, i did not find anything wrong regarding the code itselft, so failed to fix it...
could you please help focus here to fix it, thanks.

P.S. i manually insert the correct record into this talbe, after a while (tens of seconds), it automatically deteleted by FS. 

btw, i found there is a bug report like this http://jira.freeswitch.org/browse/FS-498# and it is marked 
Resolved:14/Sep/10 12:32 PM, however, my version is Nov, 30, 2010, there is still exsit.





 line#801 of sofia_reg.c:
sql = switch_mprintf("insert into sip_authentication (nonce,expires,profile_name,hostname, last_nc) "
 "values('%q', %ld, '%q', '%q', 0)", uuid_str,
 switch_epoch_time_now(NULL) + (profile->nonce_ttl ? profile->nonce_ttl : DEFAULT_NONCE_TTL),
 profile->name, mod_sofia_globals.hostname);
switch_assert(sql != NULL);
sofia_glue_actually_execute_sql(profile, sql, profile->ireg_mutex);





2011-03-26 



Charles 



发件人: Anthony Minessale 
发送时间: 2011-03-26  00:12:12 
收件人: FreeSWITCH Users Help 
抄送: 
主题: Re: [Freeswitch-users] sofia_reg_internal.db growbiggerandbiggeralong with time 
 
can you try deleting the db files sofia_reg_* db files?  Maybe they
have become corrupt?
2011/3/25 fieldpeak <fieldpeak at gmail.com>:
> Hi Jonas,
> i also think so. can you please update was the bug fixed?
>
> 在 2011-3-25 下午5:14,"Jonas Gauffin" <jonas.gauffin at gmail.com>编写:
>
> might be the same bug as I reported here:
> http://jira.freeswitch.org/browse/FS-498
>
>
>
> On Fri, Mar 25, 2011 at 8:13 AM, Charles <fieldpeak at gmail.com> wrote:
>>
>> no, this is not the c...
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-- 
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110326/f34aaec8/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 223828 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110326/f34aaec8/attachment-0001.jpe 


More information about the FreeSWITCH-users mailing list