aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-07-13 18:14:30 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-07-13 18:14:30 +0200
commitca713bb7c2f1111721796e58c74ca74e42dac12f (patch)
treebdd1bfe214e4a42beeb678a6cc62b1c1945a6596
parent66583499ed6270373dd9813e7d099fad44b7b644 (diff)
ssh: Less debug logging again
-rw-r--r--ssh/client.c11
-rw-r--r--ssh/tomsg_clientlib.c2
2 files changed, 3 insertions, 10 deletions
diff --git a/ssh/client.c b/ssh/client.c
index fbf4c1d..3fe0869 100644
--- a/ssh/client.c
+++ b/ssh/client.c
@@ -485,19 +485,14 @@ static enum tomsg_retval connect_server(
struct tomsg_async_connect_event event;
ret = tomsg_async_connect_next_event(async, &event);
if (ret == TOMSG_ERR_AGAIN) continue;
- if (ret != TOMSG_OK) {
- fprintf(stderr, "next_event returned %d\n", ret);
- return ret;
- }
+ if (ret != TOMSG_OK) return ret;
switch (event.type) {
case TOMSG_AC_HOSTKEY:
ret = tomsg_async_connect_accept(async,
hostkey_checker(event.key.hostkey, event.key.length, stdinbuf));
- if (ret != TOMSG_OK) {
- fprintf(stderr, "connect_accept returned %d\n", ret);
- return ret;
- }
+ tomsg_async_connect_event_nullify(event);
+ if (ret != TOMSG_OK) return ret;
break;
case TOMSG_AC_SUCCESS:
diff --git a/ssh/tomsg_clientlib.c b/ssh/tomsg_clientlib.c
index 9c2d80a..fb783e3 100644
--- a/ssh/tomsg_clientlib.c
+++ b/ssh/tomsg_clientlib.c
@@ -518,14 +518,12 @@ free_return:
enum tomsg_retval tomsg_async_connect_accept(struct tomsg_async_connect *client, bool accept) {
enum tomsg_retval final_retval;
if (client->state != STATE_KEY_RECEIVED) {
- fprintf(stderr, "connect_accept: client->state = %d != STATE_KEY_RECEIVED\n", client->state);
final_retval = TOMSG_ERR_TRANSPORT; // shrug
goto free_return;
}
unsigned char byte = accept ? 1 : 0;
if (!writeall(client->host_w, &byte, 1)) {
- fprintf(stderr, "writeall failed: %s\n", strerror(errno));
goto non_recoverable_error;
}