2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

gross hack to set isc_mem_debugging as it needs to be set before any

isc_mem_create() calls.
This commit is contained in:
Mark Andrews
2001-06-27 23:50:50 +00:00
parent 235839b7ef
commit f08378699a

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: main.c,v 1.114 2001/06/27 23:30:22 marka Exp $ */
/* $Id: main.c,v 1.115 2001/06/27 23:50:50 marka Exp $ */
#include <config.h>
@@ -272,7 +272,7 @@ parse_command_line(int argc, char *argv[]) {
isc_commandline_errprint = ISC_FALSE;
while ((ch = isc_commandline_parse(argc, argv,
"c:C:d:fgi:lm:n:N:p:P:st:u:vx:")) !=
"c:C:d:fgi:ln:N:p:P:st:u:vx:")) !=
-1) {
switch (ch) {
case 'c':
@@ -306,10 +306,6 @@ parse_command_line(int argc, char *argv[]) {
case 'l':
ns_g_lwresdonly = ISC_TRUE;
break;
case 'm':
isc_mem_debugging = strtoul(isc_commandline_argument,
NULL, 0);
break;
case 'N': /* Deprecated. */
case 'n':
ns_g_cpus = parse_int(isc_commandline_argument,
@@ -538,6 +534,16 @@ int
main(int argc, char *argv[]) {
isc_result_t result;
/*
* This is a gross hack. 'isc_mem_debugging' must be set
* before any calls to isc_mem_create().
*/
if (strcmp(argv[1], "-m") == 0 && argv[2] != NULL) {
isc_mem_debugging = strtoul(argv[2], NULL, 0);
argc -= 2;
argv += 2;
}
result = isc_file_progname(*argv, program_name, sizeof(program_name));
if (result != ISC_R_SUCCESS)
ns_main_earlyfatal("program name too long");