From ad5de5bb177cc061386b485239c055c3c8afcdbb Mon Sep 17 00:00:00 2001 From: ddouthitt Date: Fri, 28 Sep 2001 00:06:27 +0000 Subject: [PATCH] Drivers specified on the command line (-d) override any specified in the configuration file. --- server/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/main.c b/server/main.c index 697d617..e7db07b 100644 --- a/server/main.c +++ b/server/main.c @@ -267,8 +267,10 @@ main (int argc, char **argv) } else { // not in a driver section... if (strncasecmp(linebuf, "Driver ", 7) == 0) { - driverlist[list_index] = malloc(MAX_DRIVER_NAME_SIZE); - snprintf(driverlist[list_index++], MAX_DRIVER_NAME_SIZE, "%s", linebuf + 7); + if (driverlist[0] == NULL) { // check for arguments: override conf file drivers... + driverlist[list_index] = malloc(MAX_DRIVER_NAME_SIZE); + snprintf(driverlist[list_index++], MAX_DRIVER_NAME_SIZE, "%s", linebuf + 7); + } } } }