Modify

Opened 10 years ago

Closed 10 years ago

#3254 closed Bug (Duplicate)

_GetIP() - The overload protection of the IP discovery sites dont work!

Reported by: anonymous Owned by:
Milestone: Component: Standard UDFs
Version: 3.3.14.2 Severity: None
Keywords: _GetIP Cc:

Description

The IP discovery site overload protection dont work. The bug is probably the "Not" in
If TimerDiff($hTimer) < $GETIP_TIMER And Not $sLastIP Then

Func _GetIP()
	Local Const $GETIP_TIMER = 300000 ; Constant for how many milliseconds between each check. This is 5 minutes.
	Local Static $hTimer = 0 ; Create a static variable to store the timer handle.
	Local Static $sLastIP = 0 ; Create a static variable to store the last IP.

	If TimerDiff($hTimer) < $GETIP_TIMER And Not $sLastIP Then ; If still in the timer and $sLastIP contains a value.
		Return SetExtended(1, $sLastIP) ; Return the last IP instead and set @extended to 1.
	EndIf
.
.
.
EndFunc   ;==>_GetIP

Attachments (0)

Change History (2)

comment:1 by anonymous, 10 years ago

With overload protection i meant that the 5 minutes cooldown.

comment:2 by J-Paul Mesnage, 10 years ago

Resolution: Duplicate
Status: newclosed

This has been solved with #3120

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.