Code cleanup
This commit is contained in:
parent
04c9a1599a
commit
58437c8c8b
@ -60,14 +60,7 @@ extern int do_quiet;
|
||||
/*
|
||||
* Global variables
|
||||
*/
|
||||
extern int net_in; /* Netmails received */
|
||||
extern int net_out; /* Netmails forwarded */
|
||||
extern int net_bad; /* Bad netmails (tracking errors */
|
||||
extern int echo_in; /* Echomail received */
|
||||
extern int echo_imp; /* Echomail imported */
|
||||
extern int echo_out; /* Echomail forwarded */
|
||||
extern int echo_bad; /* Bad echomail */
|
||||
extern int echo_dupe; /* Dupe echomail */
|
||||
|
||||
int areamgr = 0; /* Nr of AreaMgr messages */
|
||||
int a_help = FALSE; /* Send AreaMgr help */
|
||||
@ -127,7 +120,6 @@ void A_Help(faddr *t, char *replyid)
|
||||
fprintf(fp, " %%LIST\r\r");
|
||||
fprintf(fp, "%s\r", TearLine());
|
||||
CloseMail(fp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -234,7 +226,6 @@ void A_Query(faddr *t, char *replyid)
|
||||
fprintf(qp, "To be continued....\r\r");
|
||||
Syslog('-', " Splitting message at %ld bytes", ftell(qp) - msgptr);
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"Your query request", replyid);
|
||||
msgptr = ftell(qp);
|
||||
}
|
||||
@ -254,7 +245,6 @@ void A_Query(faddr *t, char *replyid)
|
||||
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
|
||||
fprintf(qp, "%s\r", TearLine());
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -362,7 +352,6 @@ void A_List(faddr *t, char *replyid, int Notify)
|
||||
fprintf(qp, "To be continued....\r\r");
|
||||
Syslog('-', " Splitting message at %ld bytes", ftell(qp) - msgptr);
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"AreaMgr List", replyid);
|
||||
msgptr = ftell(qp);
|
||||
}
|
||||
@ -382,7 +371,6 @@ void A_List(faddr *t, char *replyid, int Notify)
|
||||
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
|
||||
fprintf(qp, "%s\r", TearLine());
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -497,7 +485,6 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
||||
fprintf(qp, "To be continued....\r\r");
|
||||
Syslog('-', " Splitting message at %ld bytes", ftell(qp) - msgptr);
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"AreaMgr Flow report", replyid);
|
||||
msgptr = ftell(qp);
|
||||
}
|
||||
@ -513,7 +500,6 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
||||
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
|
||||
fprintf(qp, "%s\r", TearLine());
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -555,7 +541,6 @@ void A_Status(faddr *t, char *replyid)
|
||||
|
||||
fprintf(fp, "%s\r", TearLine());
|
||||
CloseMail(fp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -666,7 +651,6 @@ void A_Unlinked(faddr *t, char *replyid)
|
||||
fprintf(qp, "To be continued....\r\r");
|
||||
Syslog('-', " Splitting message at %ld bytes", ftell(qp) - msgptr);
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"Your unlinked request", replyid);
|
||||
msgptr = ftell(qp);
|
||||
}
|
||||
@ -685,7 +669,6 @@ void A_Unlinked(faddr *t, char *replyid)
|
||||
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
|
||||
fprintf(qp, "%s\r", TearLine());
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -1213,7 +1196,6 @@ int AreaMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
|
||||
fprintf(np, "\rWith regards, %s\r\r", CFG.sysop_name);
|
||||
fprintf(np, "%s\r", TearLine());
|
||||
CloseMail(np, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
|
@ -58,14 +58,7 @@ extern int do_quiet;
|
||||
/*
|
||||
* Global variables
|
||||
*/
|
||||
extern int net_in; /* Netmails received */
|
||||
extern int net_out; /* Netmails forwarded */
|
||||
extern int net_bad; /* Bad netmails (tracking errors */
|
||||
extern int echo_in; /* Echomail received */
|
||||
extern int echo_imp; /* Echomail imported */
|
||||
extern int echo_out; /* Echomail forwarded */
|
||||
extern int echo_bad; /* Bad fileecho */
|
||||
extern int echo_dupe; /* Dupe fileecho */
|
||||
|
||||
int filemgr = 0; /* Nr of FileMgr messages */
|
||||
int f_help = FALSE; /* Send FileMgr help */
|
||||
@ -125,7 +118,6 @@ void F_Help(faddr *t, char *replyid)
|
||||
|
||||
fprintf(fp, "%s\r", TearLine());
|
||||
CloseMail(fp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -233,7 +225,6 @@ void F_Query(faddr *t, char *replyid)
|
||||
fprintf(qp, "To be continued....\r\r");
|
||||
Syslog('-', " Splitting message at %ld bytes", ftell(qp) - msgptr);
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"Your query request", replyid);
|
||||
msgptr = ftell(qp);
|
||||
}
|
||||
@ -251,7 +242,6 @@ void F_Query(faddr *t, char *replyid)
|
||||
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
|
||||
fprintf(qp, "%s\r", TearLine());
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -356,7 +346,6 @@ void F_List(faddr *t, char *replyid, int Notify)
|
||||
fprintf(qp, "To be continued....\r\r");
|
||||
Syslog('-', " Splitting message at %ld bytes", ftell(qp) - msgptr);
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"FileMgr List", replyid);
|
||||
msgptr = ftell(qp);
|
||||
}
|
||||
@ -374,7 +363,6 @@ void F_List(faddr *t, char *replyid, int Notify)
|
||||
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
|
||||
fprintf(qp, "%s\r", TearLine());
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -427,7 +415,6 @@ void F_Status(faddr *t, char *replyid)
|
||||
|
||||
fprintf(fp, "%s\r", TearLine());
|
||||
CloseMail(fp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -531,7 +518,6 @@ void F_Unlinked(faddr *t, char *replyid)
|
||||
fprintf(qp, "To be continued....\r\r");
|
||||
Syslog('-', " Splitting message at %ld bytes", ftell(qp) - msgptr);
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"Your unlinked request", replyid);
|
||||
msgptr = ftell(qp);
|
||||
}
|
||||
@ -549,7 +535,6 @@ void F_Unlinked(faddr *t, char *replyid)
|
||||
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
|
||||
fprintf(qp, "%s\r", TearLine());
|
||||
CloseMail(qp, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
@ -1046,7 +1031,6 @@ int FileMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
|
||||
fprintf(np, "\rWith regards, %s\r\r", CFG.sysop_name);
|
||||
fprintf(np, "%s\r", TearLine());
|
||||
CloseMail(np, t);
|
||||
net_out++;
|
||||
} else
|
||||
WriteError("Can't create netmail");
|
||||
}
|
||||
|
@ -42,6 +42,9 @@
|
||||
|
||||
|
||||
|
||||
extern int net_out;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Write Echomail groups list to tempfile
|
||||
@ -360,6 +363,7 @@ int UplinkRequest(faddr *t, int FileMgr, char *cmd)
|
||||
free(mgrname);
|
||||
free(bymgr);
|
||||
free(subj);
|
||||
net_out++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,8 @@
|
||||
|
||||
|
||||
|
||||
extern int net_out;
|
||||
|
||||
/*
|
||||
* Start a netmail to one of our nodes in the setup.
|
||||
* Return a file descriptor if success else NULL.
|
||||
@ -142,6 +144,7 @@ void CloseMail(FILE *qp, faddr *t)
|
||||
|
||||
putc(0, qp);
|
||||
fclose(qp);
|
||||
net_out++;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user