<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2> in libfaim aim_snac.c function
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>int aim_cleansnacs(struct aim_session_t
*sess,<BR> int maxage)<BR>{<BR> struct aim_snac_t
*cur;<BR> struct aim_snac_t *remed = NULL;<BR> time_t
curtime;<BR> <BR> cur = sess->outstanding_snacs;<BR>
<BR> curtime = time(&curtime);<BR> <BR> while
(cur)<BR> {<BR> if ( (cur)
&& (((cur->issuetime) + maxage) < curtime))<BR> {<BR>#if
DEBUG > 1<BR> printf("aimsnac: WARNING purged obsolete snac
%08lx\n", cur->id);<BR>#endif</FONT></DIV>
<DIV><FONT face=Arial size=2><BR> remed = aim_remsnac(sess,
cur->id);<BR> if (remed)<BR>
{<BR> if
(remed->data)<BR> free(remed->data);<BR>
free(remed);<BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</FONT></DIV>
<DIV><FONT face=Arial size=2> after exec this statment,it
cause a crash</FONT></DIV>
<DIV><FONT face=Arial
size=2>~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR> }<BR>
cur = cur->next;<BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2> <BR> return 0;<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>so maybe change function to this</FONT></DIV>
<DIV><BR>
<DIV><FONT face=Arial size=2>int aim_cleansnacs(struct aim_session_t
*sess,<BR> int maxage)<BR>{<BR> struct aim_snac_t
*cur;<BR> <STRONG><FONT color=#ff0000>struct aim_snac_t
*curnext;</FONT></STRONG><BR> struct aim_snac_t *remed = NULL;<BR>
time_t curtime;<BR> <BR> cur = sess->outstanding_snacs;<BR>
<BR> curtime = time(&curtime);<BR> <BR> while
(cur)<BR> {</FONT></DIV>
<DIV><FONT face=Arial size=2><STRONG><FONT
color=#ff0000> curnext =
cur;</FONT></STRONG><BR> if ( (cur) &&
(((cur->issuetime) + maxage) < curtime))<BR> {<BR>#if DEBUG >
1<BR> printf("aimsnac: WARNING purged obsolete snac %08lx\n",
cur->id);<BR>#endif</FONT></DIV>
<DIV><FONT face=Arial size=2><BR> remed = aim_remsnac(sess,
cur->id);<BR> if (remed)<BR>
{<BR> if
(remed->data)<BR> free(remed->data);<BR>
free(remed);<BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</FONT></DIV>
<DIV><FONT face=Arial size=2> after exec this statment,it
cause a crash</FONT></DIV>
<DIV><FONT face=Arial
size=2>~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR> }<BR><STRONG><FONT
color=#ff0000> cur =
curnext;</FONT></STRONG><BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2> <BR> return
0;<BR>}</FONT></DIV></DIV>
<DIV></DIV></FONT></BODY></HTML>