[Snort-users] reboot the DB

Paul Dokas dokas at ...9625...
Tue Jul 8 08:02:14 EDT 2003


On 07 Jul 2003 17:19:51 -0700 Bryan Irvine <bryan.irvine at ...9066...> wrote:
>
> op_acid_db.c
> op_acid_db.c:115: syntax error before `,'
> op_acid_db.c:116: syntax error before `,'
> op_acid_db.c: In function `DbClose':
> op_acid_db.c:947: structure has no member named `pq'
> op_acid_db.c: In function `SelectAsUInt':
> op_acid_db.c:966: structure has no member named `pq'
> op_acid_db.c: In function `Insert':
> op_acid_db.c:984: structure has no member named `pq'
> op_acid_db.c:984: `result' undeclared (first use in this function)
> op_acid_db.c:984: (Each undeclared identifier is reported only once
> op_acid_db.c:984: for each function it appears in.)
> op_acid_db.c: In function `BeginTransaction':
> op_acid_db.c:1002: structure has no member named `pq'
> op_acid_db.c: In function `EndTransaction':
> op_acid_db.c:1020: structure has no member named `pq'
> op_acid_db.c: In function `AbortTransaction':
> op_acid_db.c:1038: structure has no member named `pq'
> op_acid_db.c: In function `PostgresClose':
> op_acid_db.c:1153: warning: control reaches end of non-void function
> op_acid_db.c: At top level:
> op_acid_db.c:1155: syntax error before `,'
> op_acid_db.c:1161: syntax error before `,'
> *** Error code 1
> 
> Stop in /home/admin/barnyard-0.1.0/src/output-plugins.
> *** Error code 1
> 
> Stop in /home/admin/barnyard-0.1.0/src (line 192 of Makefile).
> *** Error code 1
> 
> Stop in /home/admin/barnyard-0.1.0 (line 164 of Makefile).
> *** Error code 1
> 
> Stop in /home/admin/barnyard-0.1.0 (line 293 of Makefile).
> # 
> 
> 
> Any ideas?


I'm also trying to compile barnyard 0.1.0 with PostgreSQL support and
I'm getting the same error.  From the looks of the code starting at line
115 of op_acid_db.c, it looks like PostgreSQL support just isn't there yet:

  #ifdef ENABLE_POSTGRES
  int PostgresConnect( );
  int PostgresClose( );
  int PostgresSelectAsUInt(  , char *sql, unsigned int *result);
  int PostgresInsert(  , char *sql, unsigned int *row_id);
  #endif /* ENABLE_POSTGRES */

Notice the missing first arguments to PostgresSelectAsUInt and PostgresInsert.

Furthermore, the actual functions, as found at the end of op_acid_db.c seem to
need a little work:

  #ifdef ENABLE_POSTGRES
  int PostgresConnect(AcidDbOpData *op_data)
  {

      return 0;
  }

  int PostgresClose( )
  {

  }

  int PostgresSelectAsUInt( , char *sql, unsigned int *result)
  {

      return 0;
  }

  int PostgresInsert(, char *sql, unsigned int *row_id)
  {


      return 0;
  }
  #endif /* ENABLE_POSTGRES */



Looks like barnyard has no PostgreSQL support yet.

Paul
-- 
Paul Dokas                                            dokas at ...9625...
======================================================================
Don Juan Matus:  "an enigma wrapped in mystery wrapped in a tortilla."




More information about the Snort-users mailing list