Change some logical ands to bitwise ands and add
authorMark Michelson <mmichelson@digium.com>
Wed, 22 Oct 2008 20:05:14 +0000 (20:05 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 22 Oct 2008 20:05:14 +0000 (20:05 +0000)
messages alerting that a channel is being ignored
if the PROC_DAHDI_NOCHAN option is set in process_dahdi.

(closes issue #13759)
Reported by: smurfix
Patches:
      dahdi.patch uploaded by smurfix (license 547)

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

channels/chan_dahdi.c

index bc4a012..951219d 100644 (file)
@@ -13741,11 +13741,14 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
 #endif                 
                        ) {
                        int iscrv;
-                       if (options && PROC_DAHDI_OPT_NOCHAN)
+                       if (options & PROC_DAHDI_OPT_NOCHAN) {
+                               ast_log(LOG_WARNING, "Channel '%s' ignored.\n", v->value);
                                continue;
+                       }
                        iscrv = !strcasecmp(v->name, "crv");
                        if (build_channels(confp, iscrv, v->value, reload, v->lineno, &found_pseudo))
                                        return -1;
+                       ast_log(LOG_DEBUG, "Channel '%s' configured.\n", v->value);
                } else if (!strcasecmp(v->name, "buffers")) {
                        int res;
                        char policy[21] = "";
@@ -14525,7 +14528,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
                        } else if (!strcasecmp(v->name, "mwilevel")) {
                                mwilevel = atoi(v->value);
                        }
-               } else if (!(options && PROC_DAHDI_OPT_NOWARN) )
+               } else if (!(options & PROC_DAHDI_OPT_NOWARN) )
                        ast_log(LOG_WARNING, "Ignoring %s at line %d.\n", v->name, v->lineno);
        }
        if (dahdichan[0]) {