Commit 007bfa82 authored by Mihai Moldovan's avatar Mihai Moldovan
Browse files

src/test/sshtest.c: try to connect a second time to see if the function is really idempotent now.

parent 9e9d174d
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment