From fd3968ee2dc1edc296ce31895c8410b227b61019 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1=C5=A1=20Brada?= Date: Wed, 28 Oct 2015 19:45:21 +0100 Subject: [PATCH] Tiny cleaning. --- Download.pas | 4 ++-- ServerLoop.pas | 2 -- Store1.pas | 2 +- ZidanStore.pas | 40 ---------------------------------------- brodnetd.pas | 4 ++-- upmgr.pas | 2 +- 6 files changed, 6 insertions(+), 48 deletions(-) delete mode 100644 ZidanStore.pas diff --git a/Download.pas b/Download.pas index 3f30181..319eefe 100644 --- a/Download.pas +++ b/Download.pas @@ -96,7 +96,7 @@ procedure tAggr.MsgDATA(sz:Word; mark:byte); delta:=(mNow-StartT){*MSecsPerDay}; if delta<400 then exit; rate:=(ByteCnt/delta)*1000; - writeln('Rate: ',(rate/1024):7:1, '(',ByteCnt,')'); + writeln('Download: rate ',(rate/1024):7:1, 'kB/s'); rateb:=round((rate)/64); StartT:=mNow; ByteCnt:=1; @@ -113,7 +113,7 @@ procedure tAggr.Periodic; DgrCntCheck:=0; Shedule(5000,@Periodic); exit end; - writeln('Periodic check failed'); + writeln('Download: Periodic check failed, unimplemented!'); //todo do end; diff --git a/ServerLoop.pas b/ServerLoop.pas index 13fe045..07ff1e8 100644 --- a/ServerLoop.pas +++ b/ServerLoop.pas @@ -132,7 +132,6 @@ procedure SignalHandler(sig:cint);CDecl; writeln; if terminated then raise eControlC.Create('CtrlC DoubleTap') ; Terminated:=true; - writeln('Shutdown requested'); end; {index=iphash+opcode} @@ -287,7 +286,6 @@ procedure ShedRun; pcur:=@cur^.next; cur:=cur^.next; end; - if delta >4990 then writeln('ServerLoop: tasks=',tasks); end; procedure Main; diff --git a/Store1.pas b/Store1.pas index 3195cb3..a479db5 100644 --- a/Store1.pas +++ b/Store1.pas @@ -14,7 +14,7 @@ tStoreObjectInfo=object procedure Open(const fid:tfid); procedure Close; - procedure SegSeek(ofs:LongWord); + procedure SegSeek(ofs:LongWord); unimplemented; procedure ReadAhead(cnt:Word; into:pointer); procedure WaitRead; {wait for read to finish, rc} private diff --git a/ZidanStore.pas b/ZidanStore.pas deleted file mode 100644 index b698894..0000000 --- a/ZidanStore.pas +++ /dev/null @@ -1,40 +0,0 @@ -unit ZidanStore; - -INTERFACE - -type -tfid=array [0..20] of byte; -tStoreObjectInfo=object - hnd:file of byte; - final:boolean; - rc:Word; - length:LongWord; - seglen:longword; - - procedure Open(const fid:tfid); - procedure Close; - procedure SegSeek(ofs:LongWord); -end; - -IMPLEMENTATION -procedure tStoreObjectInfo.Open(const fid:tfid); - begin - rc:=0; - final:=true; - length:=65000; - Assign(hnd,'/dev/urandom'); - Reset(hnd); -end; -procedure tStoreObjectInfo.Close; - begin -end; -procedure tStoreObjectInfo.SegSeek(ofs:longword); - begin - if ofs=0 then begin - rc:=0; - seglen:=65000; - end else rc:=7; -end; - -END. - \ No newline at end of file diff --git a/brodnetd.pas b/brodnetd.pas index cfb1030..6b8f84c 100644 --- a/brodnetd.pas +++ b/brodnetd.pas @@ -3,8 +3,8 @@ PROGRAM brodnetd; { Poll loop. Read message, get handler, exec handler. } uses ServerLoop ,TestWatch - //,TestTC - //,TestChat + ,TestTC + ,TestChat ,AsyncProcess ,upmgr ,TestFS diff --git a/upmgr.pas b/upmgr.pas index 0c8688f..720aff0 100644 --- a/upmgr.pas +++ b/upmgr.pas @@ -258,7 +258,7 @@ procedure tPrv.Init(ag:tAggr_ptr; var nchat:tChat; msg: tSMsg); aggr:=ag; next:=nil; prev:=nil; - chan:=msg.stream.readbyte; + chan:=msg.stream.readbyte; {todo: except} writeln('upmgr: prv init chan=',chan); weight:=100; wcur:=0; -- 2.11.4.GIT