summaryrefslogtreecommitdiff
path: root/libopie2
authormickeyl <mickeyl>2005-05-19 14:25:12 (UTC)
committer mickeyl <mickeyl>2005-05-19 14:25:12 (UTC)
commit77134583c00446fc74515889514571924e7471ed (patch) (unidiff)
tree86cec13092a360991c3759301c3ecd9f6633cd22 /libopie2
parent743204c7f71fe785a1876d95c5d880cfdff44592 (diff)
downloadopie-77134583c00446fc74515889514571924e7471ed.zip
opie-77134583c00446fc74515889514571924e7471ed.tar.gz
opie-77134583c00446fc74515889514571924e7471ed.tar.bz2
ignore empty sockets
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/linux/opcmciasystem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libopie2/opiecore/linux/opcmciasystem.cpp b/libopie2/opiecore/linux/opcmciasystem.cpp
index a924696..34e4477 100644
--- a/libopie2/opiecore/linux/opcmciasystem.cpp
+++ b/libopie2/opiecore/linux/opcmciasystem.cpp
@@ -75,18 +75,19 @@ void OPcmciaSystem::synchronize()
75 return; 75 return;
76 } 76 }
77 QTextStream cardinfo( &cardinfofile ); 77 QTextStream cardinfo( &cardinfofile );
78 while ( !cardinfo.atEnd() ) 78 while ( !cardinfo.atEnd() )
79 { 79 {
80 QString line = cardinfo.readLine(); 80 QString line = cardinfo.readLine();
81 if ( line.startsWith( "Socket" ) ) 81 // qDebug( "line = '%s'", (const char*) line );
82 if ( line.startsWith( "Socket" ) && ! line.contains( "empty" ) )
82 { 83 {
83 int mid = line.find( ':' ); 84 int mid = line.find( ':' );
84 QString name = line.right( line.length() - mid - 1 ); 85 QString name = line.right( line.length() - mid - 1 );
85 QString id = line.right( line.length() - mid + 1 ); 86 QString id = line.right( line.length() - mid + 1 );
86 if ( mid ) _interfaces.insert( name, new OPcmciaCard( this, (const char*) id ) ); 87 if ( mid ) _interfaces.insert( name.stripWhiteSpace(), new OPcmciaCard( this, (const char*) id.stripWhiteSpace() ) );
87 } 88 }
88 else 89 else
89 { 90 {
90 continue; 91 continue;
91 } 92 }
92 } 93 }