diff options
author | Pavel Roskin <plroskin@gmail.com> | 2016-06-21 16:30:17 -0700 |
---|---|---|
committer | Pavel Roskin <plroskin@gmail.com> | 2016-07-08 04:15:41 +0000 |
commit | 1ded8ec43726e9b65048be2c9f4fb044dbc0ec9d (patch) | |
tree | 57685d599781c19803c7fddc30c779b9fdfd88de /sesman/libscp/libscp_v1s_mng.c | |
parent | f908528a004812c36a27a6705f8d2453cc9084c4 (diff) | |
download | xrdp-proprietary-1ded8ec43726e9b65048be2c9f4fb044dbc0ec9d.tar.gz xrdp-proprietary-1ded8ec43726e9b65048be2c9f4fb044dbc0ec9d.zip |
Remove unused string support in scp_session_set_addr()
Using the same argument for binary and text data is not a good idea. If
string support is ever needed, it should be a separate function.
Remove SCP_ADDRESS_TYPE_IPV4_BIN and SCP_ADDRESS_TYPE_IPV6_BIN, use
SCP_ADDRESS_TYPE_IPV4 and SCP_ADDRESS_TYPE_IPV6, which simplifies the
code.
Diffstat (limited to 'sesman/libscp/libscp_v1s_mng.c')
-rw-r--r-- | sesman/libscp/libscp_v1s_mng.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sesman/libscp/libscp_v1s_mng.c b/sesman/libscp/libscp_v1s_mng.c index 24553429..e48fc86b 100644 --- a/sesman/libscp/libscp_v1s_mng.c +++ b/sesman/libscp/libscp_v1s_mng.c @@ -90,12 +90,12 @@ scp_v1s_mng_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s) if (sz == SCP_ADDRESS_TYPE_IPV4) { in_uint32_be(c->in_s, ipaddr); - scp_session_set_addr(session, SCP_ADDRESS_TYPE_IPV4_BIN, &ipaddr); + scp_session_set_addr(session, sz, &ipaddr); } else if (sz == SCP_ADDRESS_TYPE_IPV6) { in_uint8a(c->in_s, buf, 16); - scp_session_set_addr(session, SCP_ADDRESS_TYPE_IPV6_BIN, buf); + scp_session_set_addr(session, sz, buf); } /* reading hostname */ |