Commit 869e0ebd authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Setting IgnoreDCD=true causes wait_for_call() to immediate return

For Nelgin's null modem setup, putty doesn't raise DTR?

<nelgin> sexpots   1492                               root    3u      CHR               4,64        0t0         90 /dev/ttyS0
<nelgin> Well, it's listening, but when I connect with putty I get nothing.
<nelgin> DigitalMan, probably always assume a client is connected since I have my pc wired to my linux box.
parent 427599b4
Pipeline #2678 passed with stage
in 9 minutes and 43 seconds
......@@ -759,7 +759,7 @@ int modem_status(COM_HANDLE com_handle)
/* Returns TRUE if DCD (Data Carrier Detect) is high */
BOOL carrier_detect(COM_HANDLE com_handle)
{
return (modem_status(com_handle)&COM_DCD) ? TRUE:FALSE;
return (dcd_ignore || (modem_status(com_handle)&COM_DCD)) ? TRUE:FALSE;
}
/****************************************************************************/
......@@ -779,7 +779,7 @@ BOOL wait_for_call(COM_HANDLE com_handle)
if(!comRaiseDTR(com_handle))
lprintf(LOG_ERR,"ERROR %u raising DTR", COM_ERROR_VALUE);
if(com_alreadyconnected)
if(com_alreadyconnected || dcd_ignore)
return TRUE;
if(!mdm_null) {
......@@ -1250,7 +1250,7 @@ BOOL handle_call(void)
while(!terminated) {
if(!dcd_ignore && !carrier_detect(com_handle)) {
if(!carrier_detect(com_handle)) {
lprintf(LOG_WARNING,"Loss of Carrier Detect (DCD) detected");
break;
}
......@@ -1322,7 +1322,7 @@ BOOL hangup_call(COM_HANDLE com_handle)
int attempt;
int mdm_status;
if(!carrier_detect(com_handle))/* DCD already low */
if(dcd_ignore || !carrier_detect(com_handle))/* DCD already low */
return TRUE;
lprintf(LOG_DEBUG,"Waiting for transmit buffer to empty");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment