mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00: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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user