| 925 | } |
| 926 | |
| 927 | int TMSITable::tmsiTabGetPreferredA5Algorithm(const char* IMSI) |
| 928 | { |
| 929 | sqlQuery query(mTmsiDB,"TMSI_TABLE","A5_SUPPORT", "IMSI",IMSI); |
| 930 | if (!query.sqlSuccess()) return 0; |
| 931 | int cm = query.getResultInt(0); |
| 932 | #if 0 |
| 933 | char query[200]; |
| 934 | snprintf(query,200, "SELECT A5_SUPPORT from TMSI_TABLE WHERE IMSI=\"%s\"", IMSI); |
| 935 | sqlite3_stmt *stmt; |
| 936 | if (sqlite3_prepare_statement(mTmsiDB,&stmt,query)) { |
| 937 | LOG(ERR) << "sqlite3_prepare_statement failed for " << query; |
| 938 | return 0; |
| 939 | } |
| 940 | if (sqlite3_run_query(mTmsiDB,stmt)!=SQLITE_ROW) { |
| 941 | // Returning false here just means the IMSI is not there yet. |
| 942 | sqlite3_finalize(stmt); |
| 943 | return 0; |
| 944 | } |
| 945 | int cm = sqlite3_column_int(stmt,0); |
| 946 | sqlite3_finalize(stmt); |
| 947 | #endif |
| 948 | return getPreferredA5Algorithm(cm); |
| 949 | } |
| 950 | |
| 951 | |
| 952 | #if CACHE_AUTH |
no test coverage detected