static int __prepare_delete(sqlite3 *db)
{
- __STC_LOG_FUNC_ENTER__;
int rc;
static int initialized;
- if (initialized) {
- __STC_LOG_FUNC_EXIT__;
+ if (initialized)
return SQLITE_OK;
- }
PREPARE_DELETE(delete_fw_chain, DELETE_FIREWALL_CHAIN);
PREPARE_DELETE(delete_fw_rule, DELETE_FIREWALL_RULE);
PREPARE_DELETE(delete_fw_rule_per_chain, DELETE_FIREWALL_RULE_PER_CHAIN);
initialized = 1;
- __STC_LOG_FUNC_EXIT__;
return rc;
}
static void __finalize_delete(void)
{
- __STC_LOG_FUNC_ENTER__;
-
FINALIZE(delete_fw_chain);
FINALIZE(delete_fw_rule);
FINALIZE(delete_fw_rule_per_chain);
-
- __STC_LOG_FUNC_EXIT__;
}
static int __prepare_select(sqlite3 *db)
{
- __STC_LOG_FUNC_ENTER__;
int rc;
static int initialized;
- if (initialized) {
- __STC_LOG_FUNC_EXIT__;
+ if (initialized)
return SQLITE_OK;
- }
PREPARE_SELECT(select_fw_lock, SELECT_FIREWALL_LOCK);
PREPARE_SELECT(select_fw_chain, SELECT_FIREWALL_CHAIN);
PREPARE_SELECT(select_fw_rule_per_chain, SELECT_FIREWALL_RULE_PER_CHAIN);
initialized = 1;
- __STC_LOG_FUNC_EXIT__;
return rc;
}
static void __finalize_select(void)
{
- __STC_LOG_FUNC_ENTER__;
-
FINALIZE(select_fw_lock);
FINALIZE(select_fw_chain);
FINALIZE(select_fw_rule);
FINALIZE(select_fw_rule_per_chain);
-
- __STC_LOG_FUNC_EXIT__;
}
static int __prepare_update(sqlite3 *db)
{
- __STC_LOG_FUNC_ENTER__;
int rc;
static int initialized;
- if (initialized) {
- __STC_LOG_FUNC_EXIT__;
+ if (initialized)
return SQLITE_OK;
- }
PREPARE_UPDATE(update_fw_lock, UPDATE_FIREWALL_LOCK);
PREPARE_UPDATE(update_fw_chain, UPDATE_FIREWALL_CHAIN);
PREPARE_UPDATE(update_fw_rule, UPDATE_FIREWALL_RULE);
initialized = 1;
- __STC_LOG_FUNC_EXIT__;
return rc;
}
static void __finalize_update(void)
{
- __STC_LOG_FUNC_ENTER__;
-
FINALIZE(update_fw_lock);
FINALIZE(update_fw_chain);
FINALIZE(update_fw_rule);
-
- __STC_LOG_FUNC_EXIT__;
}
static int __prepare_insert(sqlite3 *db)
{
- __STC_LOG_FUNC_ENTER__;
int rc;
static int initialized;
- if (initialized) {
- __STC_LOG_FUNC_EXIT__;
+ if (initialized)
return SQLITE_OK;
- }
PREPARE_INSERT(insert_fw_lock, INSERT_FIREWALL_LOCK);
PREPARE_INSERT(insert_fw_chain, INSERT_FIREWALL_CHAIN);
PREPARE_INSERT(insert_fw_rule, INSERT_FIREWALL_RULE);
initialized = 1;
- __STC_LOG_FUNC_EXIT__;
return rc;
}
static void __finalize_insert(void)
{
- __STC_LOG_FUNC_ENTER__;
-
FINALIZE(insert_fw_lock);
FINALIZE(insert_fw_chain);
FINALIZE(insert_fw_rule);
-
- __STC_LOG_FUNC_EXIT__;
}
API stc_error_e table_firewall_insert_lock(char *name, int state)