Log when we unload a translator (bug 1460)
authorJames Golovich <james@gnuinter.net>
Wed, 21 Apr 2004 04:26:38 +0000 (04:26 +0000)
committerJames Golovich <james@gnuinter.net>
Wed, 21 Apr 2004 04:26:38 +0000 (04:26 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2730 65c4cc65-6c06-0410-ace0-fbb531ad65f3

translate.c

index 2c69d5c..48efc58 100755 (executable)
@@ -379,6 +379,7 @@ int ast_register_translator(struct ast_translator *t)
 
 int ast_unregister_translator(struct ast_translator *t)
 {
+       char tmp[80];
        struct ast_translator *u, *ul = NULL;
        ast_mutex_lock(&list_lock);
        u = list;
@@ -388,6 +389,8 @@ int ast_unregister_translator(struct ast_translator *t)
                                ul->next = u->next;
                        else
                                list = u->next;
+                       if (option_verbose > 1)
+                               ast_verbose(VERBOSE_PREFIX_2 "Unregistered translator '%s' from format %s to %s\n", term_color(tmp, t->name, COLOR_MAGENTA, COLOR_BLACK, sizeof(tmp)), ast_getformatname(1 << t->srcfmt), ast_getformatname(1 << t->dstfmt));
                        break;
                }
                ul = u;