[asterisk-dev] Constants in app_queue.c
Mark Michelson
mmichelson at digium.com
Thu Jul 23 09:21:20 CDT 2009
Benny Amorsen wrote:
> I found this gem in app_queue.c:
>
> if (!ast_strlen_zero(args.membername)) {
> membername = args.membername;
> while (*membername && *membername < 33) membername++;
> }
>
> if (!ast_strlen_zero(args.state_interface)) {
> state_interface = args.state_interface;
> while (*state_interface && *state_interface < 33) state_interface++;
> } else
> state_interface = interface;
>
>
> There are no indications why 33 is the correct value, and if whatever
> limit it is reflecting is ever changed, it is likely that the 33 will
> be forgotten.
>
>
> /Benny
Characters with values less than 32 are non-printable characters in ASCII, and
32 is a space. These lines are to ensure that we skip any non-printable
characters and spaces preceding the membername in the config file.
Really, though, app_queue should be using the ast_skip_blanks function to do this.
Mark Michelson
More information about the asterisk-dev
mailing list