[Asterisk-Dev] group number limitation

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Jan 11 13:22:36 MST 2005


On Tuesday 11 January 2005 11:26, Paradise Dove wrote:
> it seems  that the group number used for  channel group, call group
> and pickup group is limited to 32 groups (0~31) which is handeled  by
> ast_get_group function.
> my question is:
> - is there any reason to limiting this to 32?
> - in order to increasing the group number limitation, is it enough to
> change the following line in channel.c?
> channel.c:3060:                 if ((x > 31) || (x < 0)) {
> -  isn't better to change the mentioned line to a better form?
> something like this:
> channel.c:3060:                 if ((x > MAXGROUP_NUMBER ) || (x <
> MINGROUP_NUMBER)) {

The answer is 3 lines further down:

group |= (1 << x);

On the i386 architecture, which most people are running, your integers are
all 32 bits wide, which means you're limited to 32 groups.

-- 
Tilghman



More information about the asterisk-dev mailing list