diff options
| author | Leandro Pereira <leandro@hardinfo.org> | 2010-01-01 00:30:07 -0200 | 
|---|---|---|
| committer | Leandro Pereira <leandro@hardinfo.org> | 2010-01-01 00:30:07 -0200 | 
| commit | 3559154199232401cd08269854fd8f4a85757af6 (patch) | |
| tree | 8efcc49af894aacd73d039e2549267e663e5fd8f | |
| parent | bc8135efe95f1e167ee136ec32acd328998fca6e (diff) | |
Give correct results whenever the ssh connection fails
| -rw-r--r-- | hardinfo2/ssh-conn.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| 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;  	} | 
