Correct "dahdi show channels" output when specifying a group.
authorMark Michelson <mmichelson@digium.com>
Fri, 5 Jun 2009 13:51:08 +0000 (13:51 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 5 Jun 2009 13:51:08 +0000 (13:51 +0000)
Since a DAHDI channel may belong to multiple groups, we need to use
a bitwise and instead of equivalence to determine whether to display
the channel information.

(closes issue #15248)
Reported by: gentian
Patches:
      15248.patch uploaded by mmichelson (license 60)
Tested by: gentian

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199227 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index 9e4b487..a062d38 100644 (file)
@@ -16008,7 +16008,7 @@ static char *dahdi_show_channels(struct ast_cli_entry *e, int cmd, struct ast_cl
                if (filtertype) {
                        switch(filtertype) {
                        case 1: /* dahdi show channels group <group> */
-                               if (tmp->group != targetnum) {
+                               if (!(tmp->group & targetnum)) {
                                        tmp = tmp->next;
                                        continue;
                                }