<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16722">
<STYLE>@font-face {
        font-family: 宋体;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-STYLE: normal; FONT-FAMILY: Verdana; COLOR: windowtext; FONT-WEIGHT: normal; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT color=#000080 size=2 face=Verdana>Hi Anthony,</FONT></DIV>
<DIV><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT color=#000080>I&nbsp;tried to delete </FONT><FONT 
color=#000000>the&nbsp;db&nbsp;files&nbsp;sofia_reg_*&nbsp;db&nbsp;files, it is 
the same.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>Actually i've located the bug where the source&nbsp;code, when INSERTing 
the new record to the table sip_authentication(line#801 of 
sofia_reg.c),&nbsp;</DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffff00" color=#ff0000>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.</FONT></DIV>
<DIV><FONT color=#ff0000><FONT 
style="BACKGROUND-COLOR: #ffff00"></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=#ff0000><FONT 
style="BACKGROUND-COLOR: #ffff00">Please&nbsp;FOCUS here.<FONT 
color=#ff0000><FONT 
color=#ff0000><STRONG></FONT></DIV></STRONG></FONT></FONT></FONT>
<DIV>&nbsp;</DIV>
<DIV>the mail below shows the details, </DIV>
<DIV>thanks!</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><FONT size=2 face=Verdana><STRONG>sender:</STRONG> Charles</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>sent time:</STRONG> 
2011-03-25&nbsp;12:22:57</FONT></DIV>
<DIV>receiver<FONT size=2 face=Verdana><STRONG>:</STRONG> FreeSWITCH Users Help; 
msc; jeff</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>cc:</STRONG> jonas.gauffin</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>subject:</STRONG> Re: Re: 
[Freeswitch-users] sofia_reg_internal.db grow bigger and biggeralong with 
time</FONT></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>It&nbsp;looks that&nbsp;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).</DIV>
<DIV>however, i did not find anything wrong&nbsp;regarding the code itselft, so 
failed to fix it...</DIV>
<DIV>could you please help focus here to fix it, thanks.</DIV>
<DIV>&nbsp;</DIV>
<DIV>P.S. i manually insert the correct record into this talbe, after a while 
(tens of seconds), it&nbsp;automatically deteleted by FS.&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>btw, i found there is a bug report like this <A 
href="http://jira.freeswitch.org/browse/FS-498">http://jira.freeswitch.org/browse/FS-498</A># 
and it is marked 
<DL class=dates>
  <DT>Resolved:14/Sep/10 12:32 PM, however, my version is Nov, 30, 2010, there 
  is still exsit.</DT></DL></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><IMG src="cid:__0@Foxmail.net"></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><U><STRONG>&nbsp;line#801 of sofia_reg.c:</STRONG></U></DIV>
<DIV>
<DIV><EM><FONT 
color=#0000ff>sql&nbsp;=&nbsp;switch_mprintf("insert&nbsp;into&nbsp;sip_authentication&nbsp;(nonce,expires,profile_name,hostname,&nbsp;last_nc)&nbsp;"</FONT></EM></DIV>
<DIV><EM><FONT 
color=#0000ff>&nbsp;"values('%q',&nbsp;%ld,&nbsp;'%q',&nbsp;'%q',&nbsp;0)",&nbsp;uuid_str,</FONT></EM></DIV>
<DIV><EM><FONT 
color=#0000ff>&nbsp;switch_epoch_time_now(NULL)&nbsp;+&nbsp;(profile-&gt;nonce_ttl&nbsp;?&nbsp;profile-&gt;nonce_ttl&nbsp;:&nbsp;DEFAULT_NONCE_TTL),</FONT></EM></DIV>
<DIV><EM><FONT 
color=#0000ff>&nbsp;profile-&gt;name,&nbsp;mod_sofia_globals.hostname);</FONT></EM></DIV>
<DIV><EM><FONT 
color=#0000ff>switch_assert(sql&nbsp;!=&nbsp;NULL);</FONT></EM></DIV>
<DIV><EM><FONT 
color=#0000ff>sofia_glue_actually_execute_sql(profile,&nbsp;sql,&nbsp;profile-&gt;ireg_mutex);</FONT></EM></DIV></DIV>
<DIV><FONT color=#000080 size=2></FONT>&nbsp;</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 size=2 face=Verdana></FONT>&nbsp;</DIV>
<DIV><FONT color=#000080 size=2 face=Verdana></FONT>&nbsp;</DIV>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana>2011-03-26 </FONT></DIV><FONT 
color=#000080 size=2 face=Verdana>
<HR style="WIDTH: 100px" align=left color=#b5c4df SIZE=1>
</FONT>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana><SPAN>Charles</SPAN> </FONT></DIV>
<HR color=#b5c4df SIZE=1>

<DIV><FONT size=2 face=Verdana><STRONG>发件人:</STRONG> Anthony Minessale 
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>发送时间:</STRONG> 2011-03-26&nbsp; 00:12:12 
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>收件人:</STRONG> FreeSWITCH Users Help 
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>抄送:</STRONG> </FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>主题:</STRONG> Re: [Freeswitch-users] 
sofia_reg_internal.db growbiggerandbiggeralong with time </FONT></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV><FONT size=2 face=Verdana>
<DIV>can&nbsp;you&nbsp;try&nbsp;deleting&nbsp;the&nbsp;db&nbsp;files&nbsp;sofia_reg_*&nbsp;db&nbsp;files?&nbsp;&nbsp;Maybe&nbsp;they</DIV>
<DIV>have&nbsp;become&nbsp;corrupt?</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>2011/3/25&nbsp;fieldpeak&nbsp;&lt;fieldpeak@gmail.com&gt;:</DIV>
<DIV>&gt;&nbsp;Hi&nbsp;Jonas,</DIV>
<DIV>&gt;&nbsp;i&nbsp;also&nbsp;think&nbsp;so.&nbsp;can&nbsp;you&nbsp;please&nbsp;update&nbsp;was&nbsp;the&nbsp;bug&nbsp;fixed?</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;在&nbsp;2011-3-25&nbsp;下午5:14,"Jonas&nbsp;Gauffin"&nbsp;&lt;jonas.gauffin@gmail.com&gt;编写:</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;might&nbsp;be&nbsp;the&nbsp;same&nbsp;bug&nbsp;as&nbsp;I&nbsp;reported&nbsp;here:</DIV>
<DIV>&gt;&nbsp;http://jira.freeswitch.org/browse/FS-498</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;On&nbsp;Fri,&nbsp;Mar&nbsp;25,&nbsp;2011&nbsp;at&nbsp;8:13&nbsp;AM,&nbsp;Charles&nbsp;&lt;fieldpeak@gmail.com&gt;&nbsp;wrote:</DIV>
<DIV>&gt;&gt;</DIV>
<DIV>&gt;&gt;&nbsp;no,&nbsp;this&nbsp;is&nbsp;not&nbsp;the&nbsp;c...</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;_______________________________________________</DIV>
<DIV>&gt;&nbsp;FreeSWITCH-users&nbsp;mailing&nbsp;list</DIV>
<DIV>&gt;&nbsp;FreeSWITCH-users@lists.freeswitch.org</DIV>
<DIV>&gt;&nbsp;http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</DIV>
<DIV>&gt;&nbsp;UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users</DIV>
<DIV>&gt;&nbsp;http://www.freeswitch.org</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;_______________________________________________</DIV>
<DIV>&gt;&nbsp;FreeSWITCH-users&nbsp;mailing&nbsp;list</DIV>
<DIV>&gt;&nbsp;FreeSWITCH-users@lists.freeswitch.org</DIV>
<DIV>&gt;&nbsp;http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</DIV>
<DIV>&gt;&nbsp;UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users</DIV>
<DIV>&gt;&nbsp;http://www.freeswitch.org</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>--&nbsp;</DIV>
<DIV>Anthony&nbsp;Minessale&nbsp;II</DIV>
<DIV></DIV>
<DIV>FreeSWITCH&nbsp;http://www.freeswitch.org/</DIV>
<DIV>ClueCon&nbsp;http://www.cluecon.com/</DIV>
<DIV>Twitter:&nbsp;http://twitter.com/FreeSWITCH_wire</DIV>
<DIV></DIV>
<DIV>AIM:&nbsp;anthm</DIV>
<DIV>MSN:anthony_minessale@hotmail.com</DIV>
<DIV>GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com</DIV>
<DIV>IRC:&nbsp;irc.freenode.net&nbsp;#freeswitch</DIV>
<DIV></DIV>
<DIV>FreeSWITCH&nbsp;Developer&nbsp;Conference</DIV>
<DIV>sip:888@conference.freeswitch.org</DIV>
<DIV>googletalk:conf+888@conference.freeswitch.org</DIV>
<DIV>pstn:+19193869900</DIV>
<DIV></DIV>
<DIV>_______________________________________________</DIV>
<DIV>FreeSWITCH-users&nbsp;mailing&nbsp;list</DIV>
<DIV>FreeSWITCH-users@lists.freeswitch.org</DIV>
<DIV>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</DIV>
<DIV>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users</DIV>
<DIV>http://www.freeswitch.org</DIV></FONT></DIV></BODY></HTML>