]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix chan_dahd compiling with gcc 4.6 when PRI and SS7 not present.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 28 Sep 2011 20:24:41 +0000 (20:24 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 28 Sep 2011 20:24:41 +0000 (20:24 +0000)
(closes issue ASTERISK-18357)
Reported by: Matthew Nicholson

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

channels/chan_dahdi.c

index 3c52cd003b8a81f6e41d92d831aa3494d73ae4d0..423f5c0cea168cddeae0f74c22ff3af5a4a4ec2c 100644 (file)
@@ -12117,7 +12117,9 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
        struct dahdi_bufferinfo bi;
 
        int res;
+#if defined(HAVE_PRI)
        int span = 0;
+#endif /* defined(HAVE_PRI) */
        int here = 0;/*!< TRUE if the channel interface already exists. */
        int x;
        struct analog_pvt *analog_p = NULL;
@@ -12210,7 +12212,9 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
                                tmp->law_default = p.curlaw;
                                tmp->law = p.curlaw;
                                tmp->span = p.spanno;
+#if defined(HAVE_PRI)
                                span = p.spanno - 1;
+#endif /* defined(HAVE_PRI) */
                        } else {
                                chan_sig = 0;
                        }
@@ -13469,7 +13473,9 @@ static struct ast_channel *dahdi_request(const char *type, format_t format, cons
        struct dahdi_pvt *exitpvt;
        int channelmatched = 0;
        int groupmatched = 0;
+#if defined(HAVE_PRI) || defined(HAVE_SS7)
        int transcapdigital = 0;
+#endif /* defined(HAVE_PRI) || defined(HAVE_SS7) */
        struct dahdi_starting_point start;
 
        ast_mutex_lock(&iflock);
@@ -13525,8 +13531,10 @@ static struct ast_channel *dahdi_request(const char *type, format_t format, cons
                                p->distinctivering = start.cadance;
                                break;
                        case 'd':
+#if defined(HAVE_PRI) || defined(HAVE_SS7)
                                /* If this is an ISDN call, make it digital */
                                transcapdigital = AST_TRANS_CAP_DIGITAL;
+#endif /* defined(HAVE_PRI) || defined(HAVE_SS7) */
                                break;
                        default:
                                ast_log(LOG_WARNING, "Unknown option '%c' in '%s'\n", start.opt, (char *)data);