/*
- * Copyright (C) 1997-2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-2010 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
int ret;
ct->rc4c.fd = -1;
- ret = makesock(AF_UNSPEC, IPPROTO_TCP, 0, ct->conf.hostname_arg,
- ct->conf.server_port_arg);
+ ret = para_connect_simple(IPPROTO_TCP, ct->conf.hostname_arg,
+ ct->conf.server_port_arg);
if (ret < 0)
return ret;
ct->rc4c.fd = ret;
* \param ct_ptr Points to dynamically allocated and initialized client task
* struct upon successful return.
* \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.
*
* 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.
ret = -E_CLIENT_SYNTAX;
if (!ct->conf.inputs_num)
goto out;
- ct->user = ct->conf.user_given?
- para_strdup(ct->conf.user_arg) : para_logname();
-
- ct->key_file = ct->conf.key_file_given?
- para_strdup(ct->conf.key_file_arg) :
- make_message("%s/.paraslash/key.%s", home, ct->user);
ct->config_file = ct->conf.config_file_given?
para_strdup(ct->conf.config_file_arg) :
&ct->conf, ¶ms))
goto out;
}
+ ct->user = ct->conf.user_given?
+ para_strdup(ct->conf.user_arg) : para_logname();
+
+ ct->key_file = ct->conf.key_file_given?
+ para_strdup(ct->conf.key_file_arg) :
+ make_message("%s/.paraslash/key.%s", home, ct->user);
+
if (loglevel)
*loglevel = get_loglevel_by_name(ct->conf.loglevel_arg);
PARA_INFO_LOG("loglevel: %s\n", ct->conf.loglevel_arg);
free(home);
if (ret < 0) {
PARA_ERROR_LOG("%s\n", para_strerror(-ret));
+ btr_remove_node(ct->btrn);
btr_free_node(ct->btrn);
client_close(ct);
*ct_ptr = NULL;