Added better support for virtual null modem cables on Modem Control multiplexer lines.
If the multiplexer is a modem control one, this change caused connections to be established ONLY if DTR is presented by the simulated system and to always be dropped when DTR is not asserted.
This commit is contained in:
parent
e65ef135d2
commit
ba5767520f
1 changed files with 9 additions and 2 deletions
|
@ -955,6 +955,7 @@ lp->ipad = NULL;
|
||||||
if ((lp->destination) && (!lp->serport)) {
|
if ((lp->destination) && (!lp->serport)) {
|
||||||
if (lp->connecting)
|
if (lp->connecting)
|
||||||
sim_close_sock (lp->connecting, 0);
|
sim_close_sock (lp->connecting, 0);
|
||||||
|
if ((!lp->mp->modem_control) || (lp->modembits & TMXR_MDM_DTR))
|
||||||
lp->connecting = sim_connect_sock (lp->destination, "localhost", NULL);
|
lp->connecting = sim_connect_sock (lp->destination, "localhost", NULL);
|
||||||
}
|
}
|
||||||
tmxr_init_line (lp); /* initialize line state */
|
tmxr_init_line (lp); /* initialize line state */
|
||||||
|
@ -1094,10 +1095,16 @@ if (lp->mp && lp->mp->modem_control) { /* This API ONLY works on mo
|
||||||
if (bits_to_set | bits_to_clear) { /* Anything to do? */
|
if (bits_to_set | bits_to_clear) { /* Anything to do? */
|
||||||
if (lp->serport)
|
if (lp->serport)
|
||||||
return sim_control_serial (lp->serport, bits_to_set, bits_to_clear, incoming_bits);
|
return sim_control_serial (lp->serport, bits_to_set, bits_to_clear, incoming_bits);
|
||||||
if (lp->sock) {
|
if ((lp->sock) || (lp->connecting)) {
|
||||||
if (bits_to_clear&TMXR_MDM_DTR) /* drop DTR? */
|
if (bits_to_clear&TMXR_MDM_DTR) /* drop DTR? */
|
||||||
tmxr_reset_ln (lp);
|
tmxr_reset_ln (lp);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if ((lp->destination) && /* Virtual Null Modem Cable */
|
||||||
|
((bits_to_set ^ before_modem_bits) & /* and DTR being Raised */
|
||||||
|
TMXR_MDM_DTR))
|
||||||
|
lp->connecting = sim_connect_sock (lp->destination, "localhost", NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue