Commit dd9976d9 authored by Youness Alaoui's avatar Youness Alaoui

a little cleaning, don't put the sanity check inside the function

parent 4064f7ab
...@@ -56,6 +56,13 @@ ...@@ -56,6 +56,13 @@
#define STUN_RELIABLE_TIMEOUT 7900 #define STUN_RELIABLE_TIMEOUT 7900
#if STUN_RELIABLE_TIMEOUT < STUN_END_TIMEOUT
/* Reliable timeout MUST be bigger (or equal) to end timeout, so that
* retransmissions never happen with reliable transports. */
# error Inconsistent STUN timeout values!
#endif
/** /**
* Clock used throughout the STUN code. * Clock used throughout the STUN code.
* STUN requires a monotonic 1kHz clock to operate properly. * STUN requires a monotonic 1kHz clock to operate properly.
...@@ -127,11 +134,6 @@ int stun_timer_refresh (stun_timer_t *timer) ...@@ -127,11 +134,6 @@ int stun_timer_refresh (stun_timer_t *timer)
unsigned delay = stun_timer_remainder (timer); unsigned delay = stun_timer_remainder (timer);
if (delay == 0) if (delay == 0)
{ {
#if STUN_RELIABLE_TIMEOUT < STUN_END_TIMEOUT
/* Reliable timeout MUST be bigger (or equal) to end timeout, so that
* retransmissions never happen with reliable transports. */
# error Inconsistent STUN timeout values!
#endif
if (timer->delay >= STUN_END_TIMEOUT) if (timer->delay >= STUN_END_TIMEOUT)
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment