X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/e14f985630dc9b0edad92d591fbede30928cda37..ac55319310f2e0b8ac5d848c1591b5e72d49c9b3:/lcore.pas diff --git a/lcore.pas b/lcore.pas index 6effe0e..9061e45 100755 --- a/lcore.pas +++ b/lcore.pas @@ -30,7 +30,7 @@ interface {$endif} fd_utils, {$endif} - classes,pgtypes,bfifo; + classes,pgtypes,bfifo,ltimevalstuff; procedure processtasks; @@ -73,8 +73,8 @@ interface TSendData = procedure (Sender: TObject; BytesSent: Integer) of object; tlcomponent = class(tcomponent) - private - procedure releasetaskhandler(wparam,lparam:longint); + private + procedure releasetaskhandler(wparam,lparam:longint); public procedure release; virtual; destructor destroy; override; @@ -154,12 +154,6 @@ interface var timerwrapperinterface : ttimerwrapperinterface; type - {$ifdef win32} - ttimeval = record - tv_sec : longint; - tv_usec : longint; - end; - {$endif} tltimer=class(tlcomponent) protected @@ -260,7 +254,6 @@ implementation {$ifndef win32} {$include unixstuff.inc} {$endif} -{$include ltimevalstuff.inc} {!!! added sleep call -beware} @@ -283,15 +276,15 @@ begin inherited destroy; end; -procedure tlcomponent.releasetaskhandler(wparam,lparam:longint); -begin - free; -end; +procedure tlcomponent.releasetaskhandler(wparam,lparam:longint); +begin + free; +end; procedure tlcomponent.release; begin - addtask(releasetaskhandler,self,0,0); + addtask(releasetaskhandler,self,0,0); end; procedure tlasio.release; @@ -485,7 +478,10 @@ var // fdstestr : fdset; // fdstestw : fdset; begin - if state <> wsconnected then exit; + if state <> wsconnected then begin + result := -1; + exit; + end; lensent := sendq.get(data,packetbasesize*2); if assigned(data) then result := myfdwrite(fdhandleout,data^,lensent) else result := 0;