dahdi: Prevent potential error when only switching spantype of single span.
If you have a multiple span system configured for t1 mode, and you try to change only the first span from t1 to e1 via sysfs, you could get an error in the kernel log about trying to create duplicate channel. The problem is that the check for whether there was enough room for the all the channels of the switched span was wrong. Reported-by: James Brown <jbrown@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
This commit is contained in:
committed by
Russ Meyerriecks
parent
9a7db0943b
commit
a3ad32c370
@@ -7018,7 +7018,7 @@ static int _assign_spanno_and_basechan(struct dahdi_span *span)
|
||||
}
|
||||
|
||||
next_channo = _get_next_channo(pos);
|
||||
if ((basechan + span->channels) >= next_channo)
|
||||
if ((basechan + span->channels) <= next_channo)
|
||||
break;
|
||||
|
||||
/* We can't fit here, let's look at the next location. */
|
||||
|
||||
Reference in New Issue
Block a user