Lines Matching defs:sql

261 	const char *sql =
271 if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {
308 char *sql;
309 sql = sqlite3_mprintf("INSERT INTO authlog"
316 if (sql) {
317 if (sqlite3_exec(sess->server->db, sql, NULL, NULL,
322 sqlite3_free(sql);
668 char *sql;
688 sql = sqlite3_mprintf("INSERT OR REPLACE INTO pending_tc (mac_addr,identity) VALUES (%Q,%Q)",
691 if (!sql)
694 if (sqlite3_exec(sess->server->db, sql, NULL, NULL, NULL) !=
699 sqlite3_free(sql);
708 char *sql;
720 sql = sqlite3_mprintf("INSERT OR REPLACE INTO current_sessions(mac_addr,identity,start_time,nas,hs20_t_c_filtering) VALUES (%Q,%Q,%d,%Q,%u)",
723 if (sql) {
724 if (sqlite3_exec(sess->server->db, sql, NULL, NULL,
729 sqlite3_free(sql);
739 char *sql = NULL;
766 sql = sqlite3_mprintf("UPDATE users SET last_msk=%Q WHERE identity=%Q",
769 if (!sql)
772 if (sqlite3_exec(sess->server->db, sql, NULL, NULL, NULL) !=
777 sqlite3_free(sql);
846 char *sql;
872 sql = sqlite3_mprintf("INSERT INTO sim_provisioning(mobile_identifier_hash,imsi,mac_addr,eap_method,timestamp) VALUES (%Q,%Q,%Q,%Q,%u)",
874 if (!sql)
877 if (sqlite3_exec(sess->server->db, sql, NULL, NULL, NULL) !=
885 sqlite3_free(sql);
1605 char *sql;
1648 sql = sqlite3_mprintf("UPDATE current_sessions SET hs20_t_c_filtering=0, waiting_coa_ack=0, coa_ack_received=1 WHERE mac_addr=%Q",
1651 sql = sqlite3_mprintf("UPDATE current_sessions SET waiting_coa_ack=0 WHERE mac_addr=%Q",
1654 if (!sql)
1657 res = sqlite3_exec(data->db, sql, NULL, NULL, NULL);
1658 sqlite3_free(sql);
2710 char *sql;
2760 sql = sqlite3_mprintf("SELECT * FROM current_sessions WHERE mac_addr=%Q",
2762 if (!sql)
2766 res = sqlite3_exec(data->db, sql, get_db_session_fields, &fields, NULL);
2767 sqlite3_free(sql);