some platforms (e.g. FreeBSD4) need netinet/in.h to be included
[asterisk/asterisk.git] / pbx / pbx_gtkconsole.c
index 9f9a189..9017d74 100644 (file)
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include <sys/types.h>
-#include <stdlib.h>
 #include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
 #include <signal.h>
 #include <sys/time.h>
 
@@ -48,7 +42,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/config.h"
 #include "asterisk/module.h"
 #include "asterisk/logger.h"
-#include "asterisk/options.h"
 #include "asterisk/cli.h"
 #include "asterisk/utils.h"
 
@@ -313,8 +306,7 @@ static void exit_now(GtkWidget *widget, gpointer data)
        ast_update_use_count();
        ast_unregister_verbose(verboser);
        ast_unload_resource("pbx_gtkconsole", 0);
-       if (option_verbose > 1)
-               ast_verbose(VERBOSE_PREFIX_2 "GTK Console Monitor Exiting\n");
+       ast_verb(2, "GTK Console Monitor Exiting\n");
        /* XXX Trying to quit after calling this makes asterisk segfault XXX */
 }
 
@@ -488,15 +480,14 @@ static int load_module(void *mod)
                if (!show_console()) {
                        inuse++;
                        ast_update_use_count();
-                       if (option_verbose > 1)
-                               ast_verbose( VERBOSE_PREFIX_2 "Launched GTK Console monitor\n");                
+                       ast_verb(2, "Launched GTK Console monitor\n");
                } else
                        ast_log(LOG_WARNING, "Unable to start GTK console\n");
        } else {
                if (option_debug)
                        ast_log(LOG_DEBUG, "Unable to start GTK console monitor -- ignoring\n");
-               else if (option_verbose > 1)
-                       ast_verbose( VERBOSE_PREFIX_2 "GTK is not available -- skipping monitor\n");
+               else
+                       ast_verb(2, "GTK is not available -- skipping monitor\n");
        }
        return 0;
 }