[X2Go-Commits] [libx2goclient] 23/44: src/test/sshtest.c: try to connect a second time to see if the function is really idempotent now.
git-admin at x2go.org
git-admin at x2go.org
Fri Sep 18 01:55:39 CEST 2020
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository libx2goclient.
commit 007bfa828a6b0c1fd60ea513a908450783698628
Author: Mihai Moldovan <ionic at ionic.de>
Date: Mon Aug 3 12:49:45 2020 +0200
src/test/sshtest.c: try to connect a second time to see if the function is really idempotent now.
---
src/test/sshtest.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/test/sshtest.c b/src/test/sshtest.c
index fca6bf5..07e9ff6 100644
--- a/src/test/sshtest.c
+++ b/src/test/sshtest.c
@@ -100,9 +100,17 @@ int main (const int argc, const char * const * const argv) {
g_object_get (G_OBJECT (net_ssh), "connected", &conn_ret, NULL);
g_printf ("Current connection status (again): %d\n", (int) (conn_ret));
+ /* Actually connect. */
g_printf ("Trying to connect...\n");
conn_ret = x2goclient_network_ssh_connect (net_ssh, NULL);
g_printf ("Connection status: %s.\n", (conn_ret) ? "true" : "false");
+ g_object_get (G_OBJECT (net_ssh), "connected", &conn_ret, NULL);
+ g_printf ("Current connection status (via getter): %d\n", (int) (conn_ret));
+
+ /* Connect again, shouldn't cause anything to change. */
+ g_printf ("Trying to connect again...\n");
+ conn_ret = x2goclient_network_ssh_connect (net_ssh, NULL);
+ g_printf ("Connection status: %s.\n", (conn_ret) ? "true" : "false");
g_clear_object (&net_ssh);
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
More information about the x2go-commits
mailing list