address-pool: Fix off by one error

When splitting a port range, the port after a skip is not part of range.
This commit is contained in:
Olivier Crête 2013-02-12 16:29:25 -05:00 committed by Wim Taymans
parent 82828852ee
commit 456f4367e3

View file

@ -309,7 +309,7 @@ split_range (GstRTSPAddressPool * pool, AddrRange * range, gint skip,
if (skip > 0) {
/* make a range with the skipped ports */
temp = g_slice_dup (AddrRange, range);
temp->max.port = temp->min.port + skip;
temp->max.port = temp->min.port + skip - 1;
/* and store back in pool */
priv->addresses = g_list_prepend (priv->addresses, temp);