| OLD | NEW |
| 1 /* | 1 /* |
| 2 * | 2 * |
| 3 * Connection Manager | 3 * Connection Manager |
| 4 * | 4 * |
| 5 * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. | 5 * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. |
| 6 * | 6 * |
| 7 * This program is free software; you can redistribute it and/or modify | 7 * This program is free software; you can redistribute it and/or modify |
| 8 * it under the terms of the GNU General Public License version 2 as | 8 * it under the terms of the GNU General Public License version 2 as |
| 9 * published by the Free Software Foundation. | 9 * published by the Free Software Foundation. |
| 10 * | 10 * |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 static connman_bool_t is_passphrase_required( | 799 static connman_bool_t is_passphrase_required( |
| 800 const struct connman_service *service) | 800 const struct connman_service *service) |
| 801 { | 801 { |
| 802 switch (service->security) { | 802 switch (service->security) { |
| 803 case CONNMAN_SERVICE_SECURITY_WEP: | 803 case CONNMAN_SERVICE_SECURITY_WEP: |
| 804 case CONNMAN_SERVICE_SECURITY_WPA: | 804 case CONNMAN_SERVICE_SECURITY_WPA: |
| 805 case CONNMAN_SERVICE_SECURITY_RSN: | 805 case CONNMAN_SERVICE_SECURITY_RSN: |
| 806 case CONNMAN_SERVICE_SECURITY_PSK: | 806 case CONNMAN_SERVICE_SECURITY_PSK: |
| 807 if (service->passphrase == NULL) | 807 if (service->passphrase == NULL) |
| 808 return TRUE; /* must have a passphrase */ | 808 return TRUE; /* must have a passphrase */ |
| 809 if (service->state == CONNMAN_SERVICE_STATE_FAILURE && |
| 810 service->error == CONNMAN_SERVICE_ERROR_BAD_PASSPHRASE) |
| 811 return TRUE; /* bad passphrase */ |
| 809 if (service->favorite == TRUE) | 812 if (service->favorite == TRUE) |
| 810 return FALSE; /* successfully used before */ | 813 return FALSE; /* successfully used before */ |
| 811 /* if passphrase was never used, assume it is correct */ | 814 /* if passphrase was never used, assume it is correct */ |
| 812 return is_timeset(&service->last_attempt); | 815 return is_timeset(&service->last_attempt); |
| 813 | 816 |
| 814 case CONNMAN_SERVICE_SECURITY_802_1X: | 817 case CONNMAN_SERVICE_SECURITY_802_1X: |
| 815 /* | 818 /* |
| 816 * Passphrases are not mandatory for 802.1x - private | 819 * Passphrases are not mandatory for 802.1x - private |
| 817 * key files may not be encrypted, and authentication | 820 * key files may not be encrypted, and authentication |
| 818 * via PKCS#11 doesn't use passphrases. | 821 * via PKCS#11 doesn't use passphrases. |
| (...skipping 4430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5249 service_list = NULL; | 5252 service_list = NULL; |
| 5250 | 5253 |
| 5251 g_hash_table_destroy(service_hash); | 5254 g_hash_table_destroy(service_hash); |
| 5252 service_hash = NULL; | 5255 service_hash = NULL; |
| 5253 | 5256 |
| 5254 connman_storage_unregister(&service_storage); | 5257 connman_storage_unregister(&service_storage); |
| 5255 connman_notifier_unregister(&service_notifier); | 5258 connman_notifier_unregister(&service_notifier); |
| 5256 | 5259 |
| 5257 dbus_connection_unref(connection); | 5260 dbus_connection_unref(connection); |
| 5258 } | 5261 } |
| OLD | NEW |