author | josef <josef> | 2002-10-21 20:22:57 (UTC) |
---|---|---|
committer | josef <josef> | 2002-10-21 20:22:57 (UTC) |
commit | d7703116959fb71492f18a60eb41babd1183d7ec (patch) (side-by-side diff) | |
tree | b8c4d77c283ca06298525cd24cf0cf388b7443c8 | |
parent | 95a908dba86f7588e3130094e7d292f3df6a3a42 (diff) | |
download | opie-d7703116959fb71492f18a60eb41babd1183d7ec.zip opie-d7703116959fb71492f18a60eb41babd1183d7ec.tar.gz opie-d7703116959fb71492f18a60eb41babd1183d7ec.tar.bz2 |
WARNING, UNTESTED
- closeRawIO() when we're done with dialing
-rw-r--r-- | noncore/apps/opie-console/io_modem.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp index 2f0c04e..e1f9ff1 100644 --- a/noncore/apps/opie-console/io_modem.cpp +++ b/noncore/apps/opie-console/io_modem.cpp @@ -1,80 +1,82 @@ #include "io_modem.h" #include "dialer.h" IOModem::IOModem( const Profile &profile ) : IOSerial( profile ) { m_profile = profile; } IOModem::~IOModem() { } void IOModem::close() { // Hangup, discarding result Dialer d(m_profile, rawIO()); d.setHangupOnly(); d.exec(); + closeRawIO(); IOSerial::close(); } bool IOModem::open() { bool ret = IOSerial::open(); if(!ret) return false; Dialer d(m_profile, rawIO()); int result = d.exec(); + closeRawIO(); if(result == QDialog::Accepted) { return true; } else { close(); return false; } } void IOModem::reload( const Profile &config ) { m_device = config.readEntry("Device", MODEM_DEFAULT_DEVICE); m_baud = config.readNumEntry("Baud", MODEM_DEFAULT_BAUD); m_parity = config.readNumEntry("Parity", MODEM_DEFAULT_PARITY); m_dbits = config.readNumEntry("DataBits", MODEM_DEFAULT_DBITS); m_sbits = config.readNumEntry("StopBits", MODEM_DEFAULT_SBITS); m_flow = config.readNumEntry("Flow", MODEM_DEFAULT_FLOW); m_initString = config.readEntry("InitString", MODEM_DEFAULT_INIT_STRING ); m_resetString = config.readEntry("ResetString", MODEM_DEFAULT_RESET_STRING ); m_dialPref1 = config.readEntry("DialPrefix1", MODEM_DEFAULT_DIAL_PREFIX1 ); m_dialSuf1 = config.readEntry("DialSuffix1", MODEM_DEFAULT_DIAL_SUFFIX1 ); m_dialPref2 = config.readEntry("DialPrefix2", MODEM_DEFAULT_DIAL_PREFIX1 ); m_dialSuf2 = config.readEntry("DialSuffix2", MODEM_DEFAULT_DIAL_SUFFIX1 ); m_dialPref3 = config.readEntry("DialPrefix3", MODEM_DEFAULT_DIAL_PREFIX1 ); m_dialSuf3 = config.readEntry("DialSuffix3", MODEM_DEFAULT_DIAL_SUFFIX1 ); m_connect = config.readEntry("DefaultConnect" MODEM_DEFAULT_CONNECT_STRING ); m_hangup = config.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ); m_cancel = config.readEntry("CancelString", MODEM_DEFAULT_CANCEL_STRING ); m_dialTime = config.readNumEntry("DialTime", MODEM_DEFAULT_DIAL_TIME ); m_delayRedial = config.readNumEntry("DelayRedial", MODEM_DEFAULT_DELAY_REDIAL ); m_numberTries = config.readNumEntry("NumberTries", MODEM_DEFAULT_NUMBER_TRIES ); m_dtrDropTime = config.readNumEntry("DTRDRopTime", MODEM_DEFAULT_DTR_DROP_TIME ); m_bpsDetect = config.readBoolEntry("BPSDetect", MODEM_DEFAULT_BPS_DETECT ); m_dcdLines = config.readBoolEntry("DCDLines", MODEM_DEFAULT_DCD_LINES ); m_multiLineUntag = config.readBoolEntry("MultiLineUntag", MODEM_DEFAULT_MULTI_LINE_UNTAG ); } QString IOModem::identifier() const { return "modem"; } QString IOModem::name() const { return "Modem IO Layer"; } |