Consistently use DCD, not CD

This commit is contained in:
Kim Woelders
2018-10-25 07:47:58 +02:00
parent 732eb8da25
commit de0845a9ce
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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);
/*RFC2217 modem state*/
#define TNS_STATE_CD 0x80
#define TNS_STATE_DCD 0x80
#define TNS_STATE_RI 0x40
#define TNS_STATE_DSR 0x20
#define TNS_STATE_CTS 0x10
+3 -3
View File
@@ -429,12 +429,12 @@ static void _modem_status_cb(void *cctx, int status)
ttynvt_t *tty = cctx;
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_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;
if (status & TNS_STATE_RI)
mcr |= TIOCM_RI;