]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_dahdi: Remove some dead code.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 19 Feb 2015 21:23:58 +0000 (21:23 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 19 Feb 2015 21:23:58 +0000 (21:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@431992 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c
channels/sig_analog.c

index 88442a279618c804dc31cfbd367f84e2adc22476..f27991f77ff0fc1eb28132b87c0d3a1245aa8127 100644 (file)
@@ -1883,7 +1883,8 @@ static int my_distinctive_ring(struct ast_channel *chan, void *pvt, int idx, int
 
                for (;;) {
                        i = DAHDI_IOMUX_READ | DAHDI_IOMUX_SIGEVENT;
-                       if ((res = ioctl(p->subs[idx].dfd, DAHDI_IOMUX, &i))) {
+                       res = ioctl(p->subs[idx].dfd, DAHDI_IOMUX, &i);
+                       if (res) {
                                ast_log(LOG_WARNING, "I/O MUX failed: %s\n", strerror(errno));
                                ast_hangup(chan);
                                return 1;
@@ -1918,7 +1919,6 @@ static int my_distinctive_ring(struct ast_channel *chan, void *pvt, int idx, int
                                }
                                if (analog_p->ringt > 0) {
                                        if (!(--analog_p->ringt)) {
-                                               res = -1;
                                                break;
                                        }
                                }
index ce7c3b9e8ece81d8b61a38035066e0b8c223e45e..813ecca7830e23c37b552a9883bd462bf532aefb 100644 (file)
@@ -1747,7 +1747,6 @@ static void *__analog_ss_thread(void *data)
        char dtmfbuf[300];
        char namebuf[ANALOG_MAX_CID];
        char numbuf[ANALOG_MAX_CID];
-       struct callerid_state *cs = NULL;
        char *name = NULL, *number = NULL;
        int flags = 0;
        struct ast_smdi_md_message *smdi_msg = NULL;
@@ -2397,7 +2396,6 @@ static void *__analog_ss_thread(void *data)
                                int timeout_ms;
                                int ms;
                                struct timeval start = ast_tvnow();
-                               cs = NULL;
                                ast_debug(1, "Receiving DTMF cid on channel %s\n", ast_channel_name(chan));
 
                                oldlinearity = analog_set_linear_mode(p, idx, 0);
@@ -2615,8 +2613,6 @@ static void *__analog_ss_thread(void *data)
                        } else {
                                ast_log(LOG_WARNING, "Unable to get caller ID space\n");
                        }
-               } else {
-                       cs = NULL;
                }
 
                if (number) {
@@ -2624,10 +2620,6 @@ static void *__analog_ss_thread(void *data)
                }
                ast_set_callerid(chan, number, name, number);
 
-               if (cs) {
-                       callerid_free(cs);
-               }
-
                analog_handle_notify_message(chan, p, flags, -1);
 
                ast_setstate(chan, AST_STATE_RING);