external optind variable must be reset before using it because getopt may have been called earlier in the same process and without resetting argument parsing fails.
dcb.c
check dcb state before attempting to write to dcb in dcb_write
gateway.c
daemon_mode moved to global so that it can be taken into account when deciding where to print messages.
added get_config_filename by using home directory name given as a parameter. Returns absolute paths to config file and to home directory regardless of home directory argument was relative of absolute.
In main, arguments are parsed by using getopt.
Changed argument '-c' to specify home directory because MaxScale.cnf is always in <home>/etc/ directory.
Added argument '-m' to specify modules directory. Both arguments override any other settings.
skygw_types.h
Added PATH_MAX