Fixed files forwarding CSO flag
This commit is contained in:
parent
8fd37e8d8a
commit
dabde30a5e
@ -4281,6 +4281,7 @@ v0.33.19 26-Oct-2001
|
||||
On new systems it will now also create one filearea, three
|
||||
default mail areas, a newfilereport and the groups belonging
|
||||
to these areas. Also 10 oneliners are installed.
|
||||
Changed help for nodes billing flag.
|
||||
|
||||
mbsebbs:
|
||||
Added menu 317, change FS editor shortcut keys to (Emacs/
|
||||
@ -4413,6 +4414,8 @@ v0.33.19 26-Oct-2001
|
||||
Implemented long filenames with hatch. Now uses ticfile key-
|
||||
word Fullname for the long filename.
|
||||
Fixes for Sparc systems.
|
||||
File forwarding now really depends on the downlink billing
|
||||
flag.
|
||||
|
||||
mbfile:
|
||||
During check the file databases are reset to filemode 0660.
|
||||
|
@ -66,21 +66,25 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Check if this node has enough credits for this file.
|
||||
* If Costsharing active for this node
|
||||
*/
|
||||
T_File.Cost = TIC.FileCost + (TIC.FileCost * nodes.AddPerc / 1000);
|
||||
if ((nodes.Credit < (nodes.StopLevel + T_File.Cost)) && (!TIC.Charge)) {
|
||||
if (nodes.Billing) {
|
||||
/*
|
||||
* Check if this node has enough credits for this file.
|
||||
*/
|
||||
T_File.Cost = TIC.FileCost + (TIC.FileCost * nodes.AddPerc / 1000);
|
||||
if ((nodes.Credit < (nodes.StopLevel + T_File.Cost)) && (!TIC.Charge)) {
|
||||
Syslog('!', "No forward to %s, not enough credit left", aka2str(Node));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if we are passing the warning level
|
||||
*/
|
||||
if ((nodes.Credit > nodes.WarnLevel) &&
|
||||
((nodes.Credit - T_File.Cost) <= nodes.WarnLevel)) {
|
||||
/*
|
||||
* Check if we are passing the warning level
|
||||
*/
|
||||
if ((nodes.Credit > nodes.WarnLevel) && ((nodes.Credit - T_File.Cost) <= nodes.WarnLevel)) {
|
||||
Syslog('+', "Low credit warning to %s", aka2str(Node));
|
||||
/* CREATE NETMAIL */
|
||||
}
|
||||
}
|
||||
|
||||
fwdfile = calloc(PATH_MAX, sizeof(char));
|
||||
@ -195,7 +199,7 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
|
||||
* According to Harald Harms this field must
|
||||
* be multiplied with 100.
|
||||
*/
|
||||
if (TIC.FileCost)
|
||||
if (TIC.FileCost && nodes.Billing)
|
||||
fprintf(fp, "Cost %ld.00\r\n", T_File.Cost);
|
||||
if (TIC.TicIn.TotLDesc)
|
||||
for (i = 0; i < TIC.TicIn.TotLDesc; i++)
|
||||
@ -274,7 +278,7 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
|
||||
}
|
||||
}
|
||||
|
||||
if (TIC.Charge) {
|
||||
if (TIC.Charge && nodes.Billing) {
|
||||
nodes.Credit -= TIC.FileCost;
|
||||
Syslog('-', "Cost: %d Left: %d", TIC.FileCost, nodes.Credit);
|
||||
|
||||
|
@ -343,7 +343,7 @@ int ProcessTic(fa_list *sbl)
|
||||
*/
|
||||
Kb = TIC.FileSize / 1024;
|
||||
if (SearchNode(TIC.Aka)) {
|
||||
if (TIC.TicIn.Cost) {
|
||||
if (TIC.TicIn.Cost && nodes.Billing) {
|
||||
nodes.Debet -= TIC.TicIn.Cost;
|
||||
Syslog('f', "Uplink cost %ld, debet %ld", TIC.TicIn.Cost, nodes.Debet);
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ void E_Files(void)
|
||||
mvprintw(13, 6, "7. Send TIC file");
|
||||
mvprintw(14, 6, "8. Advanced TIC");
|
||||
mvprintw(15, 6, "9. File forward");
|
||||
mvprintw(16, 6, "10. Billing");
|
||||
mvprintw(16, 6, "10. Billing (CSO)");
|
||||
mvprintw( 7,46, "11. Bill direct");
|
||||
mvprintw( 8,46, "12. Credit");
|
||||
mvprintw( 9,46, "13. Debet");
|
||||
@ -437,7 +437,7 @@ void E_Files(void)
|
||||
case 7: E_BOOL(13,25, nodes.Tic, "Send ^TIC^ files to this node")
|
||||
case 8: E_BOOL(14,25, nodes.AdvTic, "Send ^advanced^ TIC files to this node")
|
||||
case 9: E_BOOL(15,25, nodes.FileFwd, "^Forward TIC^ files for this node")
|
||||
case 10:E_BOOL(16,25, nodes.Billing, "Send ^bills^ to this node")
|
||||
case 10:E_BOOL(16,25, nodes.Billing, "Send ^bills^ to this node, Costsharing is active")
|
||||
case 11:E_BOOL( 7,65, nodes.BillDirect, "Send bills ^direct^ after file processing")
|
||||
case 12:E_INT( 8,65, nodes.Credit, "The ^credit^ this node has for costsharing")
|
||||
case 13:E_INT( 9,65, nodes.Debet, "The ^debet^ in cents we have credit from this node")
|
||||
|
Reference in New Issue
Block a user