~ubuntu-branches/ubuntu/precise/networkmanagement/precise-updates

« back to all changes in this revision

Viewing changes to backends/NetworkManager/settings/802-11-wireless-securitydbus.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl, Modestas Vainius, Michael Biebl
  • Date: 2011-05-27 12:18:25 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110527121825-vfufwquq3vy0k3zn
Tags: 0.1+git20110526.911025d-1
[ Modestas Vainius ]
* Use official KDE branding in the package descriptions.

[ Michael Biebl ]
* New upstream Git snapshot 911025d81fdfbe09b64705e94e5411f521c38e3e.
* debian/control
  - Bump Build-Depends on kdelibs5-dev and kdebase-workspace-dev to
    (>= 4:4.6.0).
  - Bump Build-Depends on network-manager-dev and libnm-util-dev to
    (>= 0.8.1).
  - Bump Depends on network-manager to (>= 0.8.1).

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
  if(!setting->psk().isEmpty())
203
203
      map.insert("psk",  setting->psk());
204
204
 
205
 
  if(setting->wepKeyType() == Knm::WirelessSecuritySetting::Hex)
206
 
  {
207
 
      map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_KEY);
208
 
 
209
 
      // SECRET
210
 
      if(!setting->wepkey0().isEmpty())
211
 
          map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY0),  setting->wepkey0());
212
 
 
213
 
      // SECRET
214
 
      if(!setting->wepkey1().isEmpty())
215
 
          map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY1),  setting->wepkey1());
216
 
 
217
 
      // SECRET
218
 
      if(!setting->wepkey2().isEmpty())
219
 
          map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY2),  setting->wepkey2());
220
 
 
221
 
      // SECRET
222
 
      if(!setting->wepkey3().isEmpty())
223
 
          map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY3),  setting->wepkey3());
224
 
 
225
 
  }
226
 
  else if(setting->wepKeyType() == Knm::WirelessSecuritySetting::Passphrase)
227
 
  {
228
 
      map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_PASSPHRASE);
229
 
      map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY0, setting->weppassphrase());
230
 
  }
231
 
  else
232
 
      kWarning() << "Wep key type is not set!";
 
205
  if (setting->securityType() == Knm::WirelessSecuritySetting::EnumSecurityType::StaticWep ||
 
206
      setting->securityType() == Knm::WirelessSecuritySetting::EnumSecurityType::DynamicWep) {
 
207
    if(setting->wepKeyType() == Knm::WirelessSecuritySetting::Hex)
 
208
    {
 
209
        map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_KEY);
 
210
  
 
211
        // SECRET
 
212
        if(!setting->wepkey0().isEmpty())
 
213
            map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY0),  setting->wepkey0());
 
214
  
 
215
        // SECRET
 
216
        if(!setting->wepkey1().isEmpty())
 
217
            map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY1),  setting->wepkey1());
 
218
  
 
219
        // SECRET
 
220
        if(!setting->wepkey2().isEmpty())
 
221
            map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY2),  setting->wepkey2());
 
222
  
 
223
        // SECRET
 
224
        if(!setting->wepkey3().isEmpty())
 
225
            map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY3),  setting->wepkey3());
 
226
  
 
227
    }
 
228
    else if(setting->wepKeyType() == Knm::WirelessSecuritySetting::Passphrase)
 
229
    {
 
230
        map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_PASSPHRASE);
 
231
 
 
232
        if (!setting->weppassphrase().isEmpty())
 
233
            map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY0, setting->weppassphrase());
 
234
    }
 
235
    else
 
236
        kWarning() << "Wep key type is not set!";
 
237
  }
233
238
  } // end of if not setting->clear()
234
239
  return map;
235
240
}