mirror of
				https://github.com/kepler155c/opus
				synced 2025-10-31 07:33:00 +00:00 
			
		
		
		
	allow up to 10 sec diff in connect time due to clock mismatch in dims
This commit is contained in:
		| @@ -48,6 +48,13 @@ function Point.copy(pt) | |||||||
| 	return { x = pt.x, y = pt.y, z = pt.z } | 	return { x = pt.x, y = pt.y, z = pt.z } | ||||||
| end | end | ||||||
|  |  | ||||||
|  | function Point.round(pt) | ||||||
|  | 	pt.x = Util.round(pt.x) | ||||||
|  | 	pt.y = Util.round(pt.y) | ||||||
|  | 	pt.z = Util.round(pt.z) | ||||||
|  | 	return pt | ||||||
|  | end | ||||||
|  |  | ||||||
| function Point.same(pta, ptb) | function Point.same(pta, ptb) | ||||||
| 	return pta.x == ptb.x and | 	return pta.x == ptb.x and | ||||||
| 				 pta.y == ptb.y and | 				 pta.y == ptb.y and | ||||||
|   | |||||||
| @@ -172,7 +172,7 @@ local function trusted(msg, port) | |||||||
| 		local data = Crypto.decrypt(msg.t or '', pubKey) | 		local data = Crypto.decrypt(msg.t or '', pubKey) | ||||||
|  |  | ||||||
| 		--local sharedKey = modexp(pubKey, exchange.secretKey, public.primeMod) | 		--local sharedKey = modexp(pubKey, exchange.secretKey, public.primeMod) | ||||||
| 		return data.ts and tonumber(data.ts) and math.abs(os.time() - data.ts) < 1 | 		return data.ts and tonumber(data.ts) and math.abs(os.time() - data.ts) < 10 | ||||||
| 	end | 	end | ||||||
| end | end | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 kepler155c@gmail.com
					kepler155c@gmail.com