eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2DbUtils.cpp
equal
deleted
inserted
replaced
14 * Description: EAP and WLAN authentication protocols. |
14 * Description: EAP and WLAN authentication protocols. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 53 % |
19 * %version: 56 % |
20 */ |
20 */ |
21 |
21 |
22 // This is enumeration of EAPOL source code. |
22 // This is enumeration of EAPOL source code. |
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
24 #undef EAP_FILE_NUMBER_ENUM |
24 #undef EAP_FILE_NUMBER_ENUM |
81 |
81 |
82 EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): - calls aDatabase.Open()\n"))); |
82 EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): - calls aDatabase.Open()\n"))); |
83 |
83 |
84 error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName); |
84 error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName); |
85 |
85 |
86 EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): - Opened private DB for EAP-AKA. error=%d\n"), error)); |
86 EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): - Opened private DB for EAP-MsChapV2. error=%d\n"), error)); |
87 |
87 |
88 User::LeaveIfError(error); |
88 User::LeaveIfError(error); |
89 |
89 |
90 // 2. Create the MSCHAPv2 table to database (ignore error if database exists) |
90 // 2. Create the MSCHAPv2 table to database (ignore error if database exists) |
91 // Table columns: |
91 // Table columns: |
404 if (aSettings.iPasswordExistPresent |
404 if (aSettings.iPasswordExistPresent |
405 && !aSettings.iPasswordExist) |
405 && !aSettings.iPasswordExist) |
406 { |
406 { |
407 // Clear password from database. |
407 // Clear password from database. |
408 view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal), KNullPasswordData); |
408 view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal), KNullPasswordData); |
409 view.PutL(); |
|
410 view.SetColNullL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal)); |
409 view.SetColNullL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal)); |
411 } |
410 } |
412 |
411 |
413 // Password |
412 // Password |
414 if (aSettings.iPasswordPresent) |
413 if (aSettings.iPasswordPresent) |
702 |
701 |
703 EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::DeleteConfigurationL(): - calls aDatabase.Open()\n"))); |
702 EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::DeleteConfigurationL(): - calls aDatabase.Open()\n"))); |
704 |
703 |
705 error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName); |
704 error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName); |
706 |
705 |
707 EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::DeleteConfigurationL(): - Opened private DB for EAP-LEAP. error=%d\n"), error)); |
706 EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::DeleteConfigurationL(): - Opened private DB for EAP-MsChapV2. error=%d\n"), error)); |
708 |
707 |
709 User::LeaveIfError(error); |
708 User::LeaveIfError(error); |
710 |
709 |
711 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
710 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
712 TPtr sqlStatement = buf->Des(); |
711 TPtr sqlStatement = buf->Des(); |