Diffstat (limited to 'libopie2/opienet/onetutils.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opienet/onetutils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libopie2/opienet/onetutils.cpp b/libopie2/opienet/onetutils.cpp index e05efc2..08c40b4 100644 --- a/libopie2/opienet/onetutils.cpp +++ b/libopie2/opienet/onetutils.cpp | |||
@@ -116,21 +116,22 @@ QString OMacAddress::toString( bool substitute ) const | |||
116 | manu.sprintf( "%.2X:%.2X:%.2X", _bytes[0]&0xff, _bytes[1]&0xff, _bytes[2]&0xff ); | 116 | manu.sprintf( "%.2X:%.2X:%.2X", _bytes[0]&0xff, _bytes[1]&0xff, _bytes[2]&0xff ); |
117 | QString serial; | 117 | QString serial; |
118 | serial.sprintf( ":%.2X:%.2X:%.2X", _bytes[3]&0xff, _bytes[4]&0xff, _bytes[5]&0xff ); | 118 | serial.sprintf( ":%.2X:%.2X:%.2X", _bytes[3]&0xff, _bytes[4]&0xff, _bytes[5]&0xff ); |
119 | if ( !substitute ) return manu+serial; | 119 | if ( !substitute ) return manu+serial; |
120 | // fallback - if no vendor is found, just use the number | 120 | // fallback - if no vendor is found, just use the number |
121 | QString textmanu = OManufacturerDB::instance()->lookup( manu ); | 121 | QString textmanu = OManufacturerDB::instance()->lookup( manu ); |
122 | return textmanu.isNull() ? manu+serial : textmanu + serial; | 122 | return textmanu.isNull() ? manu+serial : textmanu+serial; |
123 | } | 123 | } |
124 | 124 | ||
125 | 125 | ||
126 | QString OMacAddress::manufacturer() const | 126 | QString OMacAddress::manufacturer() const |
127 | { | 127 | { |
128 | return OManufacturerDB::instance()->lookup( toString() ); | 128 | return OManufacturerDB::instance()->lookupExt( toString() ); |
129 | } | 129 | } |
130 | 130 | ||
131 | |||
131 | bool operator==( const OMacAddress &m1, const OMacAddress &m2 ) | 132 | bool operator==( const OMacAddress &m1, const OMacAddress &m2 ) |
132 | { | 133 | { |
133 | return memcmp( &m1._bytes, &m2._bytes, 6 ) == 0; | 134 | return memcmp( &m1._bytes, &m2._bytes, 6 ) == 0; |
134 | } | 135 | } |
135 | 136 | ||
136 | 137 | ||