]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/console/console.c
Fix bconsole bug with new BNET signals
[bacula/bacula] / bacula / src / console / console.c
index f8cb0cd1c511c018ffba5ada16f51fd93818ef81..203cee38a1a0b2d7fac214eab816a4d23871a0f5 100644 (file)
@@ -1,12 +1,12 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -31,7 +31,6 @@
  *
  *     Kern Sibbald, September MM
  *
- *     Version $Id$
  */
 
 #include "bacula.h"
@@ -323,7 +322,7 @@ static void read_and_process_input(FILE *input, BSOCK *UA_sock)
       if (is_bnet_stop(UA_sock)) {
          break;                       /* error or term */
       } else if (stat == BNET_SIGNAL) {
-         if (UA_sock->msglen == BNET_PROMPT) {
+         if (UA_sock->msglen == BNET_SUB_PROMPT) {
             at_prompt = true;
          }
          Dmsg1(100, "Got poll %s\n", bnet_sig_to_ascii(UA_sock));
@@ -604,6 +603,11 @@ static struct cpl_keywords_t cpl_keywords[] = {
    {"volume=",    ".media"         },
    {"oldvolume=", ".media"         },
    {"volstatus=", ".volstatus"     },
+   {"ls",         ".ls"            },
+   {"cd",         ".lsdir"         },
+   {"mark",       ".ls"            },
+   {"m",          ".ls"            },
+   {"unmark",     ".lsmark"        },
    {"actiononpurge=", ".actiononpurge" }
 };
 #define key_size ((int)(sizeof(cpl_keywords)/sizeof(struct cpl_keywords_t)))
@@ -868,6 +872,7 @@ static int console_init_history(const char *histfile)
    rl_completion_entry_function = dummy_completion_function;
    rl_attempted_completion_function = readline_completion;
    rl_filename_completion_desired = 0;
+   stifle_history(100);
 #endif
 
    return ret;