Removed a memory leak again
This commit is contained in:
parent
cfedf5d784
commit
747a87b393
@ -651,11 +651,16 @@ faddr *bestaka_s(faddr *addr)
|
|||||||
int is_local(faddr *addr)
|
int is_local(faddr *addr)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
faddr *tmp;
|
||||||
|
|
||||||
for (i = 0; i < 40; i++) {
|
for (i = 0; i < 40; i++) {
|
||||||
if ((CFG.akavalid[i]) && (metric(fido2faddr(CFG.aka[i]), addr) == METRIC_EQUAL))
|
tmp = fido2faddr(CFG.aka[i]);
|
||||||
|
if ((CFG.akavalid[i]) && (metric(tmp, addr) == METRIC_EQUAL)) {
|
||||||
|
tidy_faddr(tmp);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
tidy_faddr(tmp);
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ void A_Help(faddr *t, char *replyid)
|
|||||||
{
|
{
|
||||||
FILE *fp, *fi;
|
FILE *fp, *fi;
|
||||||
char *subject;
|
char *subject;
|
||||||
|
faddr *ta;
|
||||||
|
|
||||||
Syslog('+', "AreaMgr: Help");
|
Syslog('+', "AreaMgr: Help");
|
||||||
|
|
||||||
@ -92,8 +93,10 @@ void A_Help(faddr *t, char *replyid)
|
|||||||
GetRpSubject("areamgr.help",subject);
|
GetRpSubject("areamgr.help",subject);
|
||||||
|
|
||||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject , replyid)) != NULL) {
|
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject , replyid)) != NULL) {
|
||||||
if ((fi = OpenMacro("areamgr.help", nodes.Language, FALSE)) != NULL ){
|
if ((fi = OpenMacro("areamgr.help", nodes.Language, FALSE)) != NULL ) {
|
||||||
MacroVars("sAYP", "ssss", nodes.Sysop, "Areamgr", ascfnode(bestaka_s(t), 0xf), nodes.Apasswd );
|
ta = bestaka_s(t);
|
||||||
|
MacroVars("sAYP", "ssss", nodes.Sysop, "Areamgr", ascfnode(ta, 0xf), nodes.Apasswd );
|
||||||
|
tidy_faddr(ta);
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
}
|
}
|
||||||
@ -465,6 +468,7 @@ void A_Status(faddr *t, char *replyid)
|
|||||||
FILE *fp, *fi;
|
FILE *fp, *fi;
|
||||||
int i;
|
int i;
|
||||||
char *subject;
|
char *subject;
|
||||||
|
faddr *ta;
|
||||||
|
|
||||||
subject = calloc(255, sizeof(char));
|
subject = calloc(255, sizeof(char));
|
||||||
sprintf(subject,"AreaMgr Status");
|
sprintf(subject,"AreaMgr Status");
|
||||||
@ -474,23 +478,24 @@ void A_Status(faddr *t, char *replyid)
|
|||||||
i = 11;
|
i = 11;
|
||||||
else
|
else
|
||||||
i = Miy - 1;
|
i = Miy - 1;
|
||||||
MacroVars("DCEfGvPQRpqrsYy","ddddcsddddddsss",
|
MacroVars("D", "d", nodes.Direct);
|
||||||
nodes.Direct,
|
MacroVars("C", "d", nodes.Crash);
|
||||||
nodes.Crash,
|
MacroVars("E", "d", nodes.Hold);
|
||||||
nodes.Hold,
|
MacroVars("f", "d", nodes.Notify);
|
||||||
nodes.Notify,
|
MacroVars("G", "c", nodes.Language);
|
||||||
nodes.Language,
|
MacroVars("v", "s", aka2str(nodes.RouteVia));
|
||||||
aka2str(nodes.RouteVia),
|
MacroVars("P", "d", nodes.MailSent.lweek);
|
||||||
nodes.MailSent.lweek,
|
MacroVars("Q", "d", nodes.MailSent.month[i]);
|
||||||
nodes.MailSent.month[i],
|
MacroVars("R", "d", nodes.MailSent.total);
|
||||||
nodes.MailSent.total,
|
MacroVars("p", "d", nodes.MailRcvd.lweek);
|
||||||
nodes.MailRcvd.lweek,
|
MacroVars("q", "d", nodes.MailRcvd.month[i]);
|
||||||
nodes.MailRcvd.month[i],
|
MacroVars("r", "d", nodes.MailRcvd.total);
|
||||||
nodes.MailRcvd.total,
|
MacroVars("s", "s", nodes.Sysop);
|
||||||
nodes.Sysop,
|
MacroVars("Y", "s", ascfnode(t, 0xff));
|
||||||
ascfnode(t, 0xff),
|
ta = bestaka_s(t);
|
||||||
ascfnode(bestaka_s(t), 0xf)
|
MacroVars("y", "s", ascfnode(ta, 0xf));
|
||||||
);
|
tidy_faddr(ta);
|
||||||
|
|
||||||
GetRpSubject("areamgr.status",subject);
|
GetRpSubject("areamgr.status",subject);
|
||||||
|
|
||||||
if ((fi = OpenMacro("areamgr.status", nodes.Language, FALSE)) == NULL ){
|
if ((fi = OpenMacro("areamgr.status", nodes.Language, FALSE)) == NULL ){
|
||||||
|
Reference in New Issue
Block a user