This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 9b0dce27b9b945b37888de58dd9fc2949a2eedc0 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Aug 19 14:16:04 2019 +0200 src/test/sshtest.c: use new session-path property and provoke an error to test the functionality. --- src/test/sshtest.c | 15 ++++++++++++++- src/x2goclient-network-ssh.c | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/test/sshtest.c b/src/test/sshtest.c index 10173fd..41297a4 100644 --- a/src/test/sshtest.c +++ b/src/test/sshtest.c @@ -58,12 +58,25 @@ int main (int argc, char **argv) { ssh_uri = g_string_new (argv[1]); } - X2GoClientNetworkSSH *net_ssh = x2goclient_network_ssh_new (); + X2GoClientNetworkSSH *net_ssh = x2goclient_network_ssh_new (NULL); + gchar *session_path = NULL; + g_object_get (G_OBJECT (net_ssh), "session-path", &session_path, NULL); + g_printf ("session-path: %s\n", session_path); g_object_set (G_OBJECT (net_ssh), "socket-spec", ssh_uri, NULL); GSocketAddress *sock_addr = NULL; g_object_get (G_OBJECT (net_ssh), "socket", &sock_addr, NULL); g_printf ("sock_addr: %p\n", sock_addr); + /* + * Provoke error. + * + * This should not work/change the initial state. + */ + g_object_set (G_OBJECT (net_ssh), "session-path", "/i/don't/exist", NULL); + session_path = NULL; + g_object_get (G_OBJECT (net_ssh), "session-path", &session_path, NULL); + g_printf ("new session-path: %s\n", session_path); + g_printf ("Trying to connect...\n"); gboolean conn_ret = x2goclient_network_ssh_connect (net_ssh); g_printf ("Connection status: %s.\n", (conn_ret) ? "true" : "false"); diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c index 16ae82d..4090bb7 100644 --- a/src/x2goclient-network-ssh.c +++ b/src/x2goclient-network-ssh.c @@ -130,7 +130,7 @@ X2GoClientNetworkSSH* x2goclient_network_ssh_new (const char *session_path) { ret = (X2GoClientNetworkSSH*)(g_object_new_with_properties (X2GOCLIENT_TYPE_NETWORK_SSH, prop_names->len, - (const gchar **)(prop_names->data), + (const gchar**)(prop_names->data), (const GValue*)(prop_values->data))); g_array_free (prop_names, TRUE); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git