Fix for bug in reading drivers from configfile.

This commit is contained in:
robijn
2001-10-24 20:04:12 +00:00
parent dc0f01850b
commit dd52f3ddba
+5 -6
View File
@@ -357,14 +357,14 @@ process_configfile ( char *configfile )
// use the driver list from the config file. // use the driver list from the config file.
if( num_drivers == 0 ) { if( num_drivers == 0 ) {
// read the drivernames // read the drivernames
s = ""; // fill with anything
while( s ) { while( 1 ) {
s = config_get_string( "server", "driver", num_drivers, "" ); s = config_get_string( "server", "driver", num_drivers, "" );
if( s ) { if( !s || s[0] == 0 )
break;
drivernames[num_drivers] = malloc(strlen(s) + 1); drivernames[num_drivers] = malloc(strlen(s)+1);
driverfilenames[num_drivers] = malloc(1); driverfilenames[num_drivers] = malloc(strlen(s)+1);
driverargs[num_drivers] = malloc(1); driverargs[num_drivers] = malloc(1);
strcpy( drivernames[num_drivers], s ); strcpy( drivernames[num_drivers], s );
@@ -374,7 +374,6 @@ process_configfile ( char *configfile )
num_drivers++; num_drivers++;
} }
} }
}
// Now read the driver options that the server needs // Now read the driver options that the server needs
// Drivers can read their own options later... // Drivers can read their own options later...