1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-08-07 08:02:56 +03:00

tidy-up: avoid exclamations, prefer single quotes, in outputs

Closes #1079
This commit is contained in:
Viktor Szakats
2023-06-01 09:38:00 +00:00
parent c89174a78b
commit 003fb454c3
34 changed files with 208 additions and 208 deletions

View File

@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
*/
sock = socket(AF_INET, SOCK_STREAM, 0);
if(sock == LIBSSH2_INVALID_SOCKET) {
fprintf(stderr, "failed to create socket!\n");
fprintf(stderr, "failed to create socket.\n");
goto shutdown;
}
@@ -117,14 +117,14 @@ int main(int argc, char *argv[])
sin.sin_port = htons(22);
sin.sin_addr.s_addr = hostaddr;
if(connect(sock, (struct sockaddr*)(&sin), sizeof(struct sockaddr_in))) {
fprintf(stderr, "failed to connect!\n");
fprintf(stderr, "failed to connect.\n");
goto shutdown;
}
/* Create a session instance */
session = libssh2_session_init();
if(!session) {
fprintf(stderr, "Could not initialize SSH session!\n");
fprintf(stderr, "Could not initialize SSH session.\n");
goto shutdown;
}
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
if(auth_pw & 1) {
/* We could authenticate via password */
if(libssh2_userauth_password(session, username, password)) {
fprintf(stderr, "Authentication by password failed!\n");
fprintf(stderr, "Authentication by password failed.\n");
goto shutdown;
}
}
@@ -189,7 +189,7 @@ int main(int argc, char *argv[])
if(libssh2_userauth_keyboard_interactive(session, username,
&kbd_callback) ) {
fprintf(stderr,
"Authentication by keyboard-interactive failed!\n");
"Authentication by keyboard-interactive failed.\n");
goto shutdown;
}
else {
@@ -202,7 +202,7 @@ int main(int argc, char *argv[])
if(libssh2_userauth_publickey_fromfile(session, username,
pubkey, privkey,
password)) {
fprintf(stderr, "Authentication by public key failed!\n");
fprintf(stderr, "Authentication by public key failed.\n");
goto shutdown;
}
else {
@@ -210,12 +210,12 @@ int main(int argc, char *argv[])
}
}
else {
fprintf(stderr, "No supported authentication methods found!\n");
fprintf(stderr, "No supported authentication methods found.\n");
goto shutdown;
}
}
fprintf(stderr, "libssh2_sftp_init()!\n");
fprintf(stderr, "libssh2_sftp_init().\n");
sftp_session = libssh2_sftp_init(session);
if(!sftp_session) {
@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
/* Since we have not set non-blocking, tell libssh2 we are blocking */
libssh2_session_set_blocking(session, 1);
fprintf(stderr, "libssh2_sftp_opendir()!\n");
fprintf(stderr, "libssh2_sftp_opendir().\n");
/* Request a dir listing via SFTP */
sftp_handle = libssh2_sftp_opendir(sftp_session, sftppath);
if(!sftp_handle) {
@@ -234,7 +234,7 @@ int main(int argc, char *argv[])
goto shutdown;
}
fprintf(stderr, "libssh2_sftp_opendir() is done, now receive listing!\n");
fprintf(stderr, "libssh2_sftp_opendir() is done, now receive listing.\n");
do {
char mem[512];
char longentry[512];