mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
A blank line shouldn't quit the program. Also print a meaningful
message when unimplemented (from bind 8) commands are run, rather than looking them up.
This commit is contained in:
parent
f38a84ce83
commit
5f01e77fc2
1 changed files with 14 additions and 4 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nslookup.c,v 1.39 2000/09/01 22:17:53 bwelling Exp $ */
|
||||
/* $Id: nslookup.c,v 1.40 2000/09/01 22:45:16 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -740,10 +740,8 @@ get_next_command(void) {
|
|||
return;
|
||||
}
|
||||
ptr = strtok(input, " \t\r\n");
|
||||
if (ptr == NULL) {
|
||||
in_use = ISC_FALSE;
|
||||
if (ptr == NULL)
|
||||
return;
|
||||
}
|
||||
arg = strtok(NULL, " \t\r\n");
|
||||
if ((strcasecmp(ptr, "set") == 0) &&
|
||||
(arg != NULL))
|
||||
|
|
@ -755,6 +753,18 @@ get_next_command(void) {
|
|||
} else if (strcasecmp(ptr, "exit") == 0) {
|
||||
in_use = ISC_FALSE;
|
||||
return;
|
||||
} else if (strcasecmp(ptr, "help") == 0 ||
|
||||
strcasecmp(ptr, "?") == 0)
|
||||
{
|
||||
printf("The '%s' command is not yet implemented.\n", ptr);
|
||||
return;
|
||||
} else if (strcasecmp(ptr, "finger") == 0 ||
|
||||
strcasecmp(ptr, "root") == 0 ||
|
||||
strcasecmp(ptr, "ls") == 0 ||
|
||||
strcasecmp(ptr, "view") == 0)
|
||||
{
|
||||
printf("The '%s' command is not implemented.\n", ptr);
|
||||
return;
|
||||
} else
|
||||
addlookup(ptr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue