mirror of
https://github.com/BlackLight/Snort_AIPreproc.git
synced 2024-11-13 04:07:15 +01:00
Fixing a DB error
This commit is contained in:
parent
a15e1991e4
commit
8090600f65
3 changed files with 2 additions and 17 deletions
5
db.h
5
db.h
|
@ -30,7 +30,7 @@
|
|||
#define DB_init mysql_do_init
|
||||
#define DB_is_init mysql_is_init
|
||||
#define DB_query mysql_do_query
|
||||
#define DB_num_rows mysql_do_num_rows
|
||||
#define DB_num_rows mysql_num_rows
|
||||
#define DB_fetch_row mysql_fetch_row
|
||||
#define DB_free_result mysql_free_result
|
||||
#define DB_escape_string mysql_do_escape_string
|
||||
|
@ -39,14 +39,11 @@
|
|||
#define DB_out_init mysql_do_out_init
|
||||
#define DB_is_out_init mysql_is_out_init
|
||||
#define DB_out_query mysql_do_out_query
|
||||
#define DB_out_num_rows mysql_do_out_num_rows
|
||||
#define DB_out_escape_string mysql_do_out_escape_string
|
||||
#define DB_out_close mysql_do_out_close
|
||||
|
||||
DB_result* DB_query ( const char* );
|
||||
DB_result* DB_out_query ( const char* );
|
||||
unsigned long DB_num_rows();
|
||||
unsigned long DB_out_num_rows();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBPQ
|
||||
|
|
12
mysql.c
12
mysql.c
|
@ -156,18 +156,6 @@ mysql_do_out_escape_string ( char **to, const char *from, unsigned long length )
|
|||
return mysql_real_escape_string ( outdb, *to, from, length );
|
||||
}
|
||||
|
||||
unsigned long
|
||||
mysql_do_num_rows ()
|
||||
{
|
||||
return mysql_num_rows ( db );
|
||||
}
|
||||
|
||||
unsigned long
|
||||
mysql_do_num_rows ()
|
||||
{
|
||||
return mysql_num_rows ( outdb );
|
||||
}
|
||||
|
||||
void
|
||||
mysql_do_out_close ()
|
||||
{
|
||||
|
|
2
neural.c
2
neural.c
|
@ -85,7 +85,7 @@ AI_som_train ()
|
|||
AI_fatal_err ( "AIPreproc: Query error", __FILE__, __LINE__ );
|
||||
}
|
||||
|
||||
num_rows = DB_out_num_rows();
|
||||
num_rows = DB_num_rows ( res );
|
||||
|
||||
if ( !( inputs = (double**) alloca ( num_rows * sizeof ( double* ))))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue