diff --git a/src/line.c b/src/line.c index d2eb3ab..3dd407f 100644 --- a/src/line.c +++ b/src/line.c @@ -77,8 +77,7 @@ int line_connect(modem_config *cfg) char *addy = cfg->dialno; - /* Reset everything we know about the line, it may not be the same - as last time. */ + /* Reset everything we know about the line, it may not be the same as last time. */ line_init_config(cfg); LOG(LOG_INFO, "Connecting"); @@ -97,9 +96,12 @@ int line_connect(modem_config *cfg) send_nvt_command(cfg->line_data.fd, &cfg->line_data.nvt_data, NVT_WILL, NVT_OPT_ECHO); /* If space parity is detected treat it as 8 bit and try to enable binary mode */ - if (!cfg->parity) + if (!cfg->parity) { send_nvt_command(cfg->line_data.fd, &cfg->line_data.nvt_data, NVT_WILL, NVT_OPT_TRANSMIT_BINARY); + send_nvt_command(cfg->line_data.fd, &cfg->line_data.nvt_data, + NVT_DO, NVT_OPT_TRANSMIT_BINARY); + } return 0; } else { diff --git a/src/modem_core.c b/src/modem_core.c index 42cf38f..218d323 100644 --- a/src/modem_core.c +++ b/src/modem_core.c @@ -186,7 +186,7 @@ void mdm_write(modem_config *cfg, char *data, int len) int i; unsigned int v; - + if (cfg->allow_transmit == TRUE) { if (cfg->parity) { buf = malloc(len);