manager: remove curses dependent stuff from r375103
authorJonathan Rose <jrose@digium.com>
Wed, 17 Oct 2012 20:34:40 +0000 (20:34 +0000)
committerJonathan Rose <jrose@digium.com>
Wed, 17 Oct 2012 20:34:40 +0000 (20:34 +0000)
Upon further examination, this code was causing compliation problems on
CentOS at the least (possibly on any machine without curses) and also
the local value of COLS is used even with a remote console, so it is
less than ideal.

(issue ASTERISK-20396)
Reported by: Johan Wilfer

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

main/manager.c

index e018eee..a493af3 100644 (file)
@@ -89,10 +89,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/stringfields.h"
 #include "asterisk/presencestate.h"
 
-#ifdef HAVE_CURSES
-#include <curses.h>
-#endif
-
 /*** DOCUMENTATION
        <manager name="Ping" language="en_US">
                <synopsis>
@@ -1838,11 +1834,7 @@ static char *handle_showmancmds(struct ast_cli_entry *e, int cmd, struct ast_cli
                }
        }
 
-#ifdef HAVE_CURSES
-       space_remaining = COLS - name_len - 4;
-#else
        space_remaining = MGR_SHOW_TERMINAL_WIDTH - name_len - 4;
-#endif
        if (space_remaining < 0) {
                space_remaining = 0;
        }