mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Make groups be 64-bits (bug #3351, with mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
27
utils.c
27
utils.c
@@ -430,30 +430,3 @@ char *ast_strcasestr(const char *haystack, const char *needle)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*--- ast_print_group: Print call group and pickup group ---*/
|
||||
char *ast_print_group(char *buf, int buflen, unsigned int group)
|
||||
{
|
||||
unsigned int i;
|
||||
int first=1;
|
||||
char num[3];
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
if (!group) /* Return empty string if no group */
|
||||
return(buf);
|
||||
|
||||
for (i=0; i<=31; i++) { /* Max group is 31 */
|
||||
if (group & (1 << i)) {
|
||||
if (!first) {
|
||||
strncat(buf, ", ", buflen);
|
||||
} else {
|
||||
first=0;
|
||||
}
|
||||
snprintf(num, sizeof(num), "%u", i);
|
||||
strncat(buf, num, buflen);
|
||||
}
|
||||
}
|
||||
return(buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user