summaryrefslogtreecommitdiff
authorjosef <josef>2002-10-21 20:25:16 (UTC)
committer josef <josef>2002-10-21 20:25:16 (UTC)
commit9d48ea3af681dec0644c980dba889a85b9eb19a8 (patch) (unidiff)
tree69868d4452f6461bae4011436b9d25c94985b25b
parentdf721474c6ed785ab7f258f4a9d9384cafa3f8fa (diff)
downloadopie-9d48ea3af681dec0644c980dba889a85b9eb19a8.zip
opie-9d48ea3af681dec0644c980dba889a85b9eb19a8.tar.gz
opie-9d48ea3af681dec0644c980dba889a85b9eb19a8.tar.bz2
- argh! fix for closeRawIO()
even 2-line-patches can be wrong :)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_modem.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp
index e1f9ff1..f246d81 100644
--- a/noncore/apps/opie-console/io_modem.cpp
+++ b/noncore/apps/opie-console/io_modem.cpp
@@ -7,40 +7,42 @@ IOModem::IOModem( const Profile &profile )
7 : IOSerial( profile ) { 7 : IOSerial( profile ) {
8 m_profile = profile; 8 m_profile = profile;
9} 9}
10 10
11 11
12IOModem::~IOModem() { 12IOModem::~IOModem() {
13 13
14} 14}
15 15
16 16
17void IOModem::close() { 17void IOModem::close() {
18 // Hangup, discarding result 18 // Hangup, discarding result
19 Dialer d(m_profile, rawIO()); 19 int fd = rawIO();
20 Dialer d(m_profile, fd);
20 d.setHangupOnly(); 21 d.setHangupOnly();
21 d.exec(); 22 d.exec();
22 closeRawIO(); 23 closeRawIO(fd);
23 24
24 IOSerial::close(); 25 IOSerial::close();
25} 26}
26 27
27bool IOModem::open() { 28bool IOModem::open() {
28 bool ret = IOSerial::open(); 29 bool ret = IOSerial::open();
29 if(!ret) return false; 30 if(!ret) return false;
30 31
31 Dialer d(m_profile, rawIO()); 32 int fd = rawIO();
33 Dialer d(m_profile, fd);
32 34
33 int result = d.exec(); 35 int result = d.exec();
34 closeRawIO(); 36 closeRawIO(fd);
35 if(result == QDialog::Accepted) 37 if(result == QDialog::Accepted)
36 { 38 {
37 return true; 39 return true;
38 } 40 }
39 else 41 else
40 { 42 {
41 close(); 43 close();
42 return false; 44 return false;
43 } 45 }
44} 46}
45 47
46void IOModem::reload( const Profile &config ) { 48void IOModem::reload( const Profile &config ) {