}
/* connect to para_server and register the client task */
-static int client_connect(struct client_task *ct)
+static int client_connect(struct sched *s, struct client_task *ct)
{
int ret;
ct->task.pre_select = client_pre_select;
ct->task.post_select = client_post_select;
sprintf(ct->task.status, "client");
- register_task(&ct->task);
+ register_task(s, &ct->task);
return 1;
err_out:
close(ct->scc.fd);
* \param loglevel If not \p NULL, the number of the loglevel is stored here.
* \param parent Add the new buffer tree node as a child of this node.
* \param child Add the new buffer tree node as a parent of this node.
+ * \param sched The scheduler instance to register the task to.
*
* 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.
* \return Standard.
*/
int client_open(int argc, char *argv[], struct client_task **ct_ptr,
- int *loglevel, struct btr_node *parent, struct btr_node *child)
+ int *loglevel, struct btr_node *parent, struct btr_node *child,
+ struct sched *sched)
{
char *home = para_homedir();
int ret;
PARA_INFO_LOG("key_file: %s\n", ct->key_file);
PARA_NOTICE_LOG("connecting %s:%d\n", ct->conf.hostname_arg,
ct->conf.server_port_arg);
- ret = client_connect(ct);
+ ret = client_connect(sched, ct);
out:
free(home);
if (ret < 0) {