Consistently use DCD, not CD
This commit is contained in:
@@ -45,7 +45,7 @@ extern void telnet_rfc2217_cfg(tn_ctx_t * tcc, int cmd,
|
|||||||
extern void telnet_rfc2217_ctl(tn_ctx_t * tcc, unsigned int val);
|
extern void telnet_rfc2217_ctl(tn_ctx_t * tcc, unsigned int val);
|
||||||
|
|
||||||
/*RFC2217 modem state*/
|
/*RFC2217 modem state*/
|
||||||
#define TNS_STATE_CD 0x80
|
#define TNS_STATE_DCD 0x80
|
||||||
#define TNS_STATE_RI 0x40
|
#define TNS_STATE_RI 0x40
|
||||||
#define TNS_STATE_DSR 0x20
|
#define TNS_STATE_DSR 0x20
|
||||||
#define TNS_STATE_CTS 0x10
|
#define TNS_STATE_CTS 0x10
|
||||||
|
|||||||
@@ -429,12 +429,12 @@ static void _modem_status_cb(void *cctx, int status)
|
|||||||
ttynvt_t *tty = cctx;
|
ttynvt_t *tty = cctx;
|
||||||
int mcr = 0;
|
int mcr = 0;
|
||||||
|
|
||||||
DBG("MCR: DSR=%c CTS=%c RI=%c CD=%c\n",
|
DBG("MCR: DSR=%c CTS=%c RI=%c DCD=%c\n",
|
||||||
status & TNS_STATE_DSR ? '1' : '0',
|
status & TNS_STATE_DSR ? '1' : '0',
|
||||||
status & TNS_STATE_CTS ? '1' : '0',
|
status & TNS_STATE_CTS ? '1' : '0',
|
||||||
status & TNS_STATE_RI ? '1' : '0', status & TNS_STATE_CD ? '1' : '0');
|
status & TNS_STATE_RI ? '1' : '0', status & TNS_STATE_DCD ? '1' : '0');
|
||||||
|
|
||||||
if (status & TNS_STATE_CD)
|
if (status & TNS_STATE_DCD)
|
||||||
mcr |= TIOCM_CD;
|
mcr |= TIOCM_CD;
|
||||||
if (status & TNS_STATE_RI)
|
if (status & TNS_STATE_RI)
|
||||||
mcr |= TIOCM_RI;
|
mcr |= TIOCM_RI;
|
||||||
|
|||||||
Reference in New Issue
Block a user