summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index 6a363d7..f52279a 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -86,30 +86,30 @@ void ONetwork::synchronize()
86 } 86 }
87 QTextStream s( &f ); 87 QTextStream s( &f );
88 s.readLine(); 88 s.readLine();
89 s.readLine(); 89 s.readLine();
90 while ( !s.atEnd() ) 90 while ( !s.atEnd() )
91 { 91 {
92 s >> str; 92 s >> str;
93 str.truncate( str.find( ':' ) ); 93 str.truncate( str.find( ':' ) );
94 qDebug( "ONetwork: found interface '%s'", (const char*) str ); 94 qDebug( "ONetwork: found interface '%s'", (const char*) str );
95 ONetworkInterface* iface; 95 ONetworkInterface* iface;
96 if ( isWirelessInterface( str ) ) 96 if ( isWirelessInterface( str ) )
97 { 97 {
98 iface = new OWirelessNetworkInterface( this, str ); 98 iface = new OWirelessNetworkInterface( this, (const char*) str );
99 qDebug( "ONetwork: interface '%s' has Wireless Extensions", (const char*) str ); 99 qDebug( "ONetwork: interface '%s' has Wireless Extensions", (const char*) str );
100 } 100 }
101 else 101 else
102 { 102 {
103 iface = new ONetworkInterface( this, str ); 103 iface = new ONetworkInterface( this, (const char*) str );
104 } 104 }
105 _interfaces.insert( str, iface ); 105 _interfaces.insert( str, iface );
106 s.readLine(); 106 s.readLine();
107 } 107 }
108} 108}
109 109
110 110
111ONetworkInterface* ONetwork::interface( QString iface ) const 111ONetworkInterface* ONetwork::interface( QString iface ) const
112{ 112{
113 return _interfaces[iface]; 113 return _interfaces[iface];
114} 114}
115 115
@@ -165,27 +165,27 @@ void ONetworkInterface::init()
165 if ( _sfd == -1 ) 165 if ( _sfd == -1 )
166 { 166 {
167 qDebug( "ONetworkInterface::init(): Warning - can't get socket for device '%s'", name() ); 167 qDebug( "ONetworkInterface::init(): Warning - can't get socket for device '%s'", name() );
168 return; 168 return;
169 } 169 }
170} 170}
171 171
172 172
173bool ONetworkInterface::ioctl( int call, struct ifreq& ifreq ) const 173bool ONetworkInterface::ioctl( int call, struct ifreq& ifreq ) const
174{ 174{
175 int result = ::ioctl( _sfd, call, &ifreq ); 175 int result = ::ioctl( _sfd, call, &ifreq );
176 if ( result == -1 ) 176 if ( result == -1 )
177 qDebug( "ONetworkInterface::ioctl(): Call %d - Status: Failed: %d (%s)", call, result, strerror( errno ) ); 177 qDebug( "ONetworkInterface::ioctl (%s) call %d - Status: Failed: %d (%s)", name(), call, result, strerror( errno ) );
178 else 178 else
179 qDebug( "ONetworkInterface::ioctl(): Call %d - Status: Ok.", call ); 179 qDebug( "ONetworkInterface::ioctl (%s) call %d - Status: Ok.", name(), call );
180 return ( result != -1 ); 180 return ( result != -1 );
181} 181}
182 182
183 183
184bool ONetworkInterface::ioctl( int call ) const 184bool ONetworkInterface::ioctl( int call ) const
185{ 185{
186 strcpy( _ifr.ifr_name, name() ); 186 strcpy( _ifr.ifr_name, name() );
187 return ioctl( call, _ifr ); 187 return ioctl( call, _ifr );
188} 188}
189 189
190 190
191bool ONetworkInterface::isLoopback() const 191bool ONetworkInterface::isLoopback() const
@@ -669,27 +669,27 @@ QString OWirelessNetworkInterface::SSID() const
669void OWirelessNetworkInterface::setSSID( const QString& ssid ) 669void OWirelessNetworkInterface::setSSID( const QString& ssid )
670{ 670{
671 _iwr.u.essid.pointer = const_cast<char*>( (const char*) ssid ); 671 _iwr.u.essid.pointer = const_cast<char*>( (const char*) ssid );
672 _iwr.u.essid.length = ssid.length(); 672 _iwr.u.essid.length = ssid.length();
673 wioctl( SIOCSIWESSID ); 673 wioctl( SIOCSIWESSID );
674} 674}
675 675
676 676
677bool OWirelessNetworkInterface::wioctl( int call, struct iwreq& iwreq ) const 677bool OWirelessNetworkInterface::wioctl( int call, struct iwreq& iwreq ) const
678{ 678{
679 int result = ::ioctl( _sfd, call, &iwreq ); 679 int result = ::ioctl( _sfd, call, &iwreq );
680 if ( result == -1 ) 680 if ( result == -1 )
681 qDebug( "ONetworkInterface::wioctl(): Call %d - Status: Failed: %d (%s)", call, result, strerror( errno ) ); 681 qDebug( "ONetworkInterface::wioctl (%s) call %d - Status: Failed: %d (%s)", name(), call, result, strerror( errno ) );
682 else 682 else
683 qDebug( "ONetworkInterface::wioctl(): Call %d - Status: Ok.", call ); 683 qDebug( "ONetworkInterface::wioctl (%s) call %d - Status: Ok.", name(), call );
684 return ( result != -1 ); 684 return ( result != -1 );
685} 685}
686 686
687 687
688bool OWirelessNetworkInterface::wioctl( int call ) const 688bool OWirelessNetworkInterface::wioctl( int call ) const
689{ 689{
690 strcpy( _iwr.ifr_name, name() ); 690 strcpy( _iwr.ifr_name, name() );
691 return wioctl( call, _iwr ); 691 return wioctl( call, _iwr );
692} 692}
693 693
694 694
695/*====================================================================================== 695/*======================================================================================