Changed PKT naming from DDHHMMSS to a new format
This commit is contained in:
parent
e24ecf331f
commit
aaa9111b23
|
@ -724,6 +724,7 @@ Begin
|
|||
Close (F);
|
||||
End;
|
||||
|
||||
(*
|
||||
Function GetFTNPKTName : String;
|
||||
Var
|
||||
Hour, Min, Sec, hSec : Word;
|
||||
|
@ -734,6 +735,31 @@ Begin
|
|||
|
||||
Result := strZero(Day) + strZero(Hour) + strZero(Min) + strZero(Sec);
|
||||
End;
|
||||
*)
|
||||
|
||||
Function GetFTNPKTName : String;
|
||||
Var
|
||||
Hour, Min, Sec, hSec : Word;
|
||||
Year, Month, Day, DOW : Word;
|
||||
SecsPast : Cardinal;
|
||||
Begin
|
||||
|
||||
// PKT filename format used by Mystic:
|
||||
// 2 digit day of month + seconds past midnight + hundredths of second
|
||||
//
|
||||
// This gives a max possible value of 318640099 and will create unique
|
||||
// packet names for up to one month accurate to the hundredth of a second.
|
||||
// A 1/100th second delay when generating the name guarentees uniqueness.
|
||||
//
|
||||
// This value is then converted to hex to enforce a maximum of 8 characters.
|
||||
|
||||
WaitMS (10);
|
||||
GetDate (Year, Month, Day, DOW);
|
||||
GetTime (Hour, Min, Sec, hSec);
|
||||
|
||||
SecsPast := ((Hour * 60) * 60) + (Min * 60) + Sec;
|
||||
Result := strI2H(strS2I(strZero(Day) + strPadL(strI2S(SecsPast), 5, '0') + strZero(hSec)), 8);
|
||||
End;
|
||||
|
||||
Function GetNodeByIndex (Num: LongInt; Var TempNode: RecEchoMailNode) : Boolean;
|
||||
Var
|
||||
|
|
|
@ -924,12 +924,12 @@ Begin
|
|||
Continue;
|
||||
End;
|
||||
|
||||
If Queue.Add(True, OutPath, DirInfo.Name, FileNewExt(DirInfo.Name, 'pkt')) Then
|
||||
Queue.QData[Queue.QSize]^.Extra := OutPath;
|
||||
|
||||
//If Queue.Add(True, OutPath, DirInfo.Name, FileNewExt(GetFTNPktName, 'pkt')) Then
|
||||
//If Queue.Add(True, OutPath, DirInfo.Name, FileNewExt(DirInfo.Name, 'pkt')) Then
|
||||
// Queue.QData[Queue.QSize]^.Extra := OutPath;
|
||||
|
||||
If Queue.Add(True, OutPath, DirInfo.Name, GetFTNPKTName + '.pkt') Then
|
||||
Queue.QData[Queue.QSize]^.Extra := OutPath;
|
||||
|
||||
FindNext (DirInfo);
|
||||
End;
|
||||
|
||||
|
|
|
@ -3866,4 +3866,13 @@
|
|||
! MUTIL import of FIDOBONE will now replace / and \ characters when
|
||||
calculating the datafile name, if they exist in the echotag.
|
||||
|
||||
+ Changed the filename format used when Mystic generates PKT filenames in
|
||||
bundles and when sending ?UT files:
|
||||
|
||||
Old way: Day of month + Hour + Minutes + Seconds
|
||||
New way: Hex(Day + Seconds past midnight + Hundredth of seconds)
|
||||
|
||||
This allows truely unique names down to the hundred of a second for a one
|
||||
month period. It solves all collision issues caused by the old way!
|
||||
|
||||
<ALPHA 38 RELEASED>
|
||||
|
|
Loading…
Reference in New Issue