]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_input.c
Add heap stats to Dir and SD -- eliminate #ifdefs
[bacula/bacula] / bacula / src / dird / ua_input.c
index c0f3ea74ed55aff70bacc4e911a8bb09f8e0ad48..dde38e8b40c099b75d1abcac9339bfd399fedc00 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /*
-   Copyright (C) 2000-2003 Kern Sibbald and John Walker
+   Copyright (C) 2000-2004 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -36,7 +36,7 @@
 
 /* Exported functions */
 
-int get_cmd(UAContext *ua, char *prompt)
+int get_cmd(UAContext *ua, const char *prompt)
 {
    BSOCK *sock = ua->UA_sock;
    int stat;
@@ -55,8 +55,7 @@ int get_cmd(UAContext *ua, char *prompt)
       if (is_bnet_stop(sock)) {
         return 0;                    /* error or terminate */
       }
-      ua->cmd = check_pool_memory_size(ua->cmd, sock->msglen+1);
-      bstrncpy(ua->cmd, sock->msg, sock->msglen+1);
+      pm_strcpy(&ua->cmd, sock->msg);
       strip_trailing_junk(ua->cmd);
       if (strcmp(ua->cmd, ".messages") == 0) {
         qmessagescmd(ua, ua->cmd);
@@ -75,7 +74,7 @@ int get_cmd(UAContext *ua, char *prompt)
  *  Returns:  0 if failure
  *           1 if success => value in ua->pint32_val
  */
-int get_pint(UAContext *ua, char *prompt)
+int get_pint(UAContext *ua, const char *prompt)
 {
    double dval;
    ua->pint32_val = 0;
@@ -104,7 +103,7 @@ int get_pint(UAContext *ua, char *prompt)
  *           1 if success => ua->pint32_val == 1 for yes
  *                           ua->pint32_val == 0 for no
  */
-int get_yesno(UAContext *ua, char *prompt)
+int get_yesno(UAContext *ua, const char *prompt)
 {
    int len;