Fix running on big endian
RFC2217 options with one byte values were always sent with value = 0.
This commit is contained in:
+4
-2
@@ -43,10 +43,12 @@ void telnet_rfc2217_cfg(tn_ctx_t * tcc, int cmd, const void *val, int nd)
|
||||
telnet_set_opt(tcc, TNO_CPCO, cmd, val, nd);
|
||||
}
|
||||
|
||||
void telnet_rfc2217_ctl(tn_ctx_t * tcc, int cmd)
|
||||
void telnet_rfc2217_ctl(tn_ctx_t * tcc, unsigned int val)
|
||||
{
|
||||
unsigned char byte = val;
|
||||
|
||||
if (!tcc->mode_rfc2217)
|
||||
return;
|
||||
|
||||
telnet_set_opt(tcc, TNO_CPCO, TNS_SET_CONTROL, &cmd, 1);
|
||||
telnet_set_opt(tcc, TNO_CPCO, TNS_SET_CONTROL, &byte, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user