From 3559154199232401cd08269854fd8f4a85757af6 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Fri, 1 Jan 2010 00:30:07 -0200 Subject: Give correct results whenever the ssh connection fails --- hardinfo2/ssh-conn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hardinfo2') diff --git a/hardinfo2/ssh-conn.c b/hardinfo2/ssh-conn.c index d73c2a57..b14310c2 100644 --- a/hardinfo2/ssh-conn.c +++ b/hardinfo2/ssh-conn.c @@ -249,13 +249,13 @@ SSHConnResponse ssh_new(SoupURI * uri, if (bytes_read > 0 && res == 1) { DEBUG("Received (error channel): [%s]", buffer); - if (g_str_has_prefix(buffer, "Permission denied")) { + if (strstr(buffer, "Permission denied")) { response = SSH_CONN_PERMISSION_DENIED; goto end; - } else if (g_str_has_prefix(buffer, "Host key verification failed")) { + } else if (strstr(buffer, "Host key verification failed")) { response = SSH_CONN_HOST_KEY_CHECK_FAIL; goto end; - } else if (g_str_has_prefix(buffer, "Connection refused")) { + } else if (strstr(buffer, "Connection refused")) { response = SSH_CONN_REFUSED; goto end; } -- cgit v1.2.3