X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=client_common.c;h=9886cfe5f93ef187f0f61fc0642a68b41f0b0619;hp=ee3a13f75911788f10f325c905a0ac0bc8fd6356;hb=6442f07bb08eb6e557086587f997b1785ea18ef7;hpb=335730538150250f32c0df0b184fb494e2bb0df3 diff --git a/client_common.c b/client_common.c index ee3a13f7..9886cfe5 100644 --- a/client_common.c +++ b/client_common.c @@ -116,6 +116,8 @@ static void client_pre_select(struct sched *s, struct task *t) } return; case CL_SENDING: + if (!ct->in_loaded) /* stdin task not yet started */ + return; if (*ct->in_loaded) { PARA_INFO_LOG("loaded: %zd\n", *ct->in_loaded); para_fd_set(ct->fd, &s->wfds, &s->max_fileno); @@ -308,8 +310,8 @@ err_out: * * \param argc Usual argument count. * \param argv Usual argument vector. - * \param pcd_ptr Points to dynamically allocated and initialized private client data - * upon successful return. + * \param ct_ptr Points to dynamically allocated and initialized client task + * struct upon successful return. * * Check the command line options given by \a argc and argv, set default values * for user name and rsa key file, read further option from the config file. @@ -326,7 +328,9 @@ int client_open(int argc, char *argv[], struct client_task **ct_ptr) *ct_ptr = ct; ct->fd = -1; - ret = client_cmdline_parser(argc, argv, &ct->conf); + ret = -E_CLIENT_SYNTAX; + if (client_cmdline_parser(argc, argv, &ct->conf)) + goto out; HANDLE_VERSION_FLAG("client", ct->conf); ret = -E_CLIENT_SYNTAX; if (!ct->conf.inputs_num) @@ -351,10 +355,13 @@ int client_open(int argc, char *argv[], struct client_task **ct_ptr) .override = 0, .initialize = 0, .check_required = 0, - .check_ambiguity = 0 + .check_ambiguity = 0, + .print_errors = 0 }; - client_cmdline_parser_config_file(ct->config_file, - &ct->conf, ¶ms); + ret = -E_BAD_CONFIG; + if (client_cmdline_parser_config_file(ct->config_file, + &ct->conf, ¶ms)) + goto out; } ret = 1; PARA_INFO_LOG("loglevel: %d\n", ct->conf.loglevel_arg); @@ -372,4 +379,3 @@ out: } return ret; } -