diff options
author | David Timber <mieabby@gmail.com> | 2021-07-12 23:39:13 +1000 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2021-07-12 23:39:13 +1000 |
commit | 035df3be909e1c2509814f870c2d10edfa23576d (patch) | |
tree | e5f6293d844d3a205824545dbb64b3c55494688d /src/htbt.c | |
parent | 15bde4c46b707f7a95c7ea6650a3f02d67e50530 (diff) |
Impl proone-htbtclient, fix htbt ...
* Fix bug where htbt slv ctx loops when the connection stays on. This
bug has not been found earlier because the test connections shutdown
write channel
* Fix bug where errno is not properly set when htbt_main_do_connect()
fails
* Add test for protocol enums
* proone-htbtclient: impl hover command
Diffstat (limited to 'src/htbt.c')
-rw-r--r-- | src/htbt.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1419,6 +1419,10 @@ static bool htbt_slv_consume_inbuf ( htbt_slv_raise_protoerr(ctx, f_head.id, PRNE_HTBT_STATUS_UNIMPL); goto END; } + + if (!ret) { + break; + } } END: @@ -1656,6 +1660,7 @@ ERR: if (getsockopt(pfd[i].fd, SOL_SOCKET, SO_ERROR, &f_ret, &sl) != 0 || f_ret != 0) { + errno = f_ret; continue; } |