Don't bother checking for negative delay/jitter

It's kind of pointless. However technically the argument should
be a number and not a string - it's always in ms.
This commit is contained in:
Bob Lantz
2018-07-25 19:44:44 -07:00
parent 1ef12e450a
commit bf83f4f343
+1 -5
View File
@@ -285,11 +285,7 @@ class TCIntf( Intf ):
loss=None, max_queue_size=None ): loss=None, max_queue_size=None ):
"Internal method: return tc commands for delay and loss" "Internal method: return tc commands for delay and loss"
cmds = [] cmds = []
if delay and delay < 0: if loss and ( loss < 0 or loss > 100 ):
error( 'Negative delay', delay, '\n' )
elif jitter and jitter < 0:
error( 'Negative jitter', jitter, '\n' )
elif loss and ( loss < 0 or loss > 100 ):
error( 'Bad loss percentage', loss, '%%\n' ) error( 'Bad loss percentage', loss, '%%\n' )
else: else:
# Delay/jitter/loss/max queue size # Delay/jitter/loss/max queue size