summaryrefslogtreecommitdiff
path: root/libopie2/opienet/opcap.cpp
Unidiff
Diffstat (limited to 'libopie2/opienet/opcap.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/opcap.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp
index 012c0a3..4d786f5 100644
--- a/libopie2/opienet/opcap.cpp
+++ b/libopie2/opienet/opcap.cpp
@@ -829,5 +829,5 @@ OWaveLanManagementSSID::~OWaveLanManagementSSID()
829 829
830 830
831QString OWaveLanManagementSSID::ID() const 831QString OWaveLanManagementSSID::ID( bool decloak ) const
832{ 832{
833 int length = _data->length; 833 int length = _data->length;
@@ -836,5 +836,14 @@ QString OWaveLanManagementSSID::ID() const
836 memcpy( &essid, &_data->ssid, length ); 836 memcpy( &essid, &_data->ssid, length );
837 essid[length] = 0x0; 837 essid[length] = 0x0;
838 return essid; 838 if ( !decloak || length < 2 || essid[0] != '\0' ) return essid;
839 odebug << "OWaveLanManagementSSID:ID(): SSID is cloaked - decloaking..." << oendl;
840
841 QString decloakedID;
842 for ( int i = 1; i < length; ++i )
843 {
844 if ( essid[i] >= 32 && essid[i] <= 126 ) decloakedID.append( essid[i] );
845 else decloakedID.append( '.' );
846 }
847 return decloakedID;
839} 848}
840 849