1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

using bin types when forwarding msg anyways

This commit is contained in:
Nicolas Viennot 2015-10-04 10:27:24 -07:00
parent 5f607d338c
commit 51ba50ac0d

View File

@ -65,10 +65,11 @@ int _msgpack_pack_object(msgpack_packer* pk, msgpack_object d)
case MSGPACK_OBJECT_STR: case MSGPACK_OBJECT_STR:
{ {
/* XXX using bin types anyway! */
if (tmate_encoder_from_pk(pk)->mpac_version >= 5) { if (tmate_encoder_from_pk(pk)->mpac_version >= 5) {
int ret = msgpack_pack_str(pk, d.via.str.size); int ret = msgpack_pack_bin(pk, d.via.str.size);
if(ret < 0) { return ret; } if(ret < 0) { return ret; }
return msgpack_pack_str_body(pk, d.via.str.ptr, d.via.str.size); return msgpack_pack_bin_body(pk, d.via.str.ptr, d.via.str.size);
} else { } else {
int ret = msgpack_pack_v4raw(pk, d.via.str.size); int ret = msgpack_pack_v4raw(pk, d.via.str.size);
if(ret < 0) { return ret; } if(ret < 0) { return ret; }