]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue #9608 - fix some annoying DEBUG messages not controlled by option_debug (DEA...
authorOlle Johansson <oej@edvina.net>
Fri, 27 Apr 2007 08:10:43 +0000 (08:10 +0000)
committerOlle Johansson <oej@edvina.net>
Fri, 27 Apr 2007 08:10:43 +0000 (08:10 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@62095 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c
main/manager.c

index 3a8301c5e25e553dc64906f33b98ca9e53ab5103..bd7b14adc349ce9b489b596b9c8802e4e99d7868 100644 (file)
@@ -1399,7 +1399,8 @@ static int update_conf(struct zt_pvt *p)
                   Kill it. */
                p->confno = -1;
        }
-       ast_log(LOG_DEBUG, "Updated conferencing on %d, with %d conference users\n", p->channel, needconf);
+       if (option_debug)
+               ast_log(LOG_DEBUG, "Updated conferencing on %d, with %d conference users\n", p->channel, needconf);
        return 0;
 }
 
@@ -1544,7 +1545,8 @@ static int set_actual_txgain(int fd, int chan, float gain, int law)
        g.chan = chan;
        res = ioctl(fd, ZT_GETGAINS, &g);
        if (res) {
-               ast_log(LOG_DEBUG, "Failed to read gains: %s\n", strerror(errno));
+               if (option_debug)
+                       ast_log(LOG_DEBUG, "Failed to read gains: %s\n", strerror(errno));
                return res;
        }
 
@@ -2440,7 +2442,8 @@ static int zt_hangup(struct ast_channel *ast)
        if (p->exten)
                p->exten[0] = '\0';
 
-       ast_log(LOG_DEBUG, "Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
+       if (option_debug)
+               ast_log(LOG_DEBUG, "Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
                p->channel, index, p->subs[SUB_REAL].zfd, p->subs[SUB_CALLWAIT].zfd, p->subs[SUB_THREEWAY].zfd);
        p->ignoredtmf = 0;
        
@@ -2867,7 +2870,8 @@ static int zt_setoption(struct ast_channel *chan, int option, void *data, int da
                cp = (char *) data;
                p->mate = 0;
                if (!*cp) { /* turn it off */
-                       ast_log(LOG_DEBUG, "Set option TDD MODE, value: OFF(0) on %s\n",chan->name);
+                       if (option_debug)
+                               ast_log(LOG_DEBUG, "Set option TDD MODE, value: OFF(0) on %s\n",chan->name);
                        if (p->tdd)
                                tdd_free(p->tdd);
                        p->tdd = 0;
index e364fcfdbdecd2f93b60de86e8ef7de00ebd0407..07458a50689b3caffac671dad49d22ef1494d733 100644 (file)
@@ -1989,7 +1989,8 @@ static int process_message(struct mansession *s, const struct message *m)
        int ret = 0;
 
        ast_copy_string(action, astman_get_header(m, "Action"), sizeof(action));
-       ast_log( LOG_DEBUG, "Manager received command '%s'\n", action );
+       if (option_debug)
+               ast_log( LOG_DEBUG, "Manager received command '%s'\n", action );
 
        if (ast_strlen_zero(action)) {
                astman_send_error(s, m, "Missing action in request");