socketno : integer;\r
begin\r
for socketno := 0 to numsock -1 do begin\r
socketno : integer;\r
begin\r
for socketno := 0 to numsock -1 do begin\r
- if assigned(sockets[socketno]) then begin
+ if assigned(sockets[socketno]) then begin\r
if dnsserverids[socketno] >= 0 then begin\r
reportlag(dnsserverids[socketno],-1);\r
dnsserverids[socketno] := -1;\r
end;\r
sockets[socketno].release;\r
setstate_request_init('',states[socketno]);\r
if dnsserverids[socketno] >= 0 then begin\r
reportlag(dnsserverids[socketno],-1);\r
dnsserverids[socketno] := -1;\r
end;\r
sockets[socketno].release;\r
setstate_request_init('',states[socketno]);\r
end;\r
inherited destroy;\r
end;\r
end;\r
inherited destroy;\r
end;\r
fd_utils,\r
{$endif}\r
lcorernd,\r
fd_utils,\r
{$endif}\r
lcorernd,\r
ltimevalstuff;\r
\r
//convert a name to an IP\r
ltimevalstuff;\r
\r
//convert a name to an IP\r
{$ifndef nosignal}\r
lsignal,\r
{$endif}\r
{$ifndef nosignal}\r
lsignal,\r
{$endif}\r
\r
{$include unixstuff.inc}\r
\r
\r
{$include unixstuff.inc}\r
\r
//than crash after over four billion\r
//windows have been made ;)\r
nextwindowhandle : qword = $100000000;\r
//than crash after over four billion\r
//windows have been made ;)\r
nextwindowhandle : qword = $100000000;\r
\r
//findthreaddata should only be called while holding the structurelock\r
function findthreaddata(threadid : integer) : tthreaddata;\r
\r
//findthreaddata should only be called while holding the structurelock\r
function findthreaddata(threadid : integer) : tthreaddata;\r
\r
unit ltimevalstuff;\r
interface\r
\r
unit ltimevalstuff;\r
interface\r
-
-{$ifdef win32}
- type
- ttimeval = record
- tv_sec : longint;
- tv_usec : longint;
- end;
-{$else}
- {$ifdef ver1_0}
- uses linux;
- {$else}
- uses baseunix,unix,unixutil;
- {$endif}
-{$endif}
-
+\r
+{$ifdef win32}\r
+ type\r
+ ttimeval = record\r
+ tv_sec : longint; \r
+ tv_usec : longint; \r
+ end;\r
+{$else}\r
+ {$ifdef ver1_0}\r
+ uses linux;\r
+ {$else}\r
+ uses baseunix,unix,unixutil;\r
+ {$endif}\r
+{$endif}\r
+ \r
\r
procedure tv_add(var tv:ttimeval;msec:integer);\r
function tv_compare(const tv1,tv2:ttimeval):boolean;\r
procedure tv_substract(var tv:ttimeval;const tv2:ttimeval);\r
procedure msectotimeval(var tv:ttimeval;msec:integer);\r
\r
procedure tv_add(var tv:ttimeval;msec:integer);\r
function tv_compare(const tv1,tv2:ttimeval):boolean;\r
procedure tv_substract(var tv:ttimeval;const tv2:ttimeval);\r
procedure msectotimeval(var tv:ttimeval;msec:integer);\r
//tv_invalidtimebig will always compare as greater than any valid timeval\r
//tv_invalidtimebig will always compare as greater than any valid timeval\r
-//unfortunately unixstuff.inc hasn't worked it's magic yet so we
+//unfortunately unixstuff.inc hasn't worked it's magic yet so we\r
//have to ifdef this manually.\r
const\r
//have to ifdef this manually.\r
const\r
tv_invalidtimebig : ttimeval = (sec:maxlongint;usec:maxlongint);\r
tv_invalidtimebig : ttimeval = (sec:maxlongint;usec:maxlongint);\r
tv_invalidtimebig : ttimeval = (tv_sec:maxlongint;tv_usec:maxlongint);\r
tv_invalidtimebig : ttimeval = (tv_sec:maxlongint;tv_usec:maxlongint);\r
+\r
+{$i unixstuff.inc}\r
\r
{add nn msec to tv}\r
procedure tv_add(var tv:ttimeval;msec:integer);\r
\r
{add nn msec to tv}\r
procedure tv_add(var tv:ttimeval;msec:integer);\r