mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +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.
|
* 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>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -740,10 +740,8 @@ get_next_command(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ptr = strtok(input, " \t\r\n");
|
ptr = strtok(input, " \t\r\n");
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL)
|
||||||
in_use = ISC_FALSE;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
arg = strtok(NULL, " \t\r\n");
|
arg = strtok(NULL, " \t\r\n");
|
||||||
if ((strcasecmp(ptr, "set") == 0) &&
|
if ((strcasecmp(ptr, "set") == 0) &&
|
||||||
(arg != NULL))
|
(arg != NULL))
|
||||||
@@ -755,6 +753,18 @@ get_next_command(void) {
|
|||||||
} else if (strcasecmp(ptr, "exit") == 0) {
|
} else if (strcasecmp(ptr, "exit") == 0) {
|
||||||
in_use = ISC_FALSE;
|
in_use = ISC_FALSE;
|
||||||
return;
|
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
|
} else
|
||||||
addlookup(ptr);
|
addlookup(ptr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user