diff --git a/src/common/options.c b/src/common/options.c --- a/src/common/options.c +++ b/src/common/options.c @@ -17,10 +17,11 @@ along with DistRen. If not, see . */ -#include "options.h" +#include "common/options.h" #include "common/asprintf.h" #include "common/misc.h" +#include "common/multiio.h" #include "common/libremoteio.h" #include "common/protocol.h" @@ -40,7 +41,7 @@ struct options_common_data Not reentrant because of call to getenv() @todo replace abort()s with something useful */ -int options_init(int argc, char *argv[], cfg_t **mycfg, cfg_opt_t *myopts, char *myname, struct options_common **allopts) +int options_init(int argc, char *argv[], cfg_t **mycfg, cfg_opt_t *myopts, char *myname, struct options_common **allopts, multiio_context_t multiio) { char *configfileprefix; char *configfile; @@ -153,8 +154,9 @@ int options_init(int argc, char *argv[], } memset((*allopts)->remoteio, '\0', sizeof(struct remoteio_opts)); (*allopts)->remoteio->ssh_command = strdup("ssh"); - /** @TODO: check for NULL return above */ - + /** @TODO: check for NULL return above -- a segfault dereferencing NULL is more fun than such a check ;-) */ + (*allopts)->remoteio->multiio = multiio; + multiio_socket_type_register(multiio, &(*allopts)->remoteio->socket_type); cfg_opt_t common_opts[] = {