-
-
- /* Generating final SQL */
- snprintf(sql_query, OS_SIZE_8192,
- "INSERT INTO "
- "alert(id,server_id,rule_id,timestamp,location_id,src_ip,src_port,dst_ip,dst_port,alertid) "
- "VALUES ('%u', '%u', '%u','%u', '%u', '%lu', '%u', '%lu', '%u', '%s')",
- db_config->alert_id, db_config->server_id, al_data->rule,
- (unsigned int)time(0), *loc_id,
- (unsigned long)ntohl(s_ip), (unsigned short)s_port,
- (unsigned long)ntohl(d_ip), (unsigned short)d_port,
- al_data->alertid);
-
-
- /* Inserting into the db */
- if(!osdb_query_insert(db_config->conn, sql_query))
- {
- merror(DB_GENERROR, ARGV0);
- }
-
-