Răsfoiți Sursa

fixed bug (the table name in the query used to get overwritten).

Raphael Coeffic 21 ani în urmă
părinte
comite
32d9b793e1
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      db/db_fifo.c

+ 2 - 1
db/db_fifo.c

@@ -120,6 +120,7 @@
 
 
 
 
 static char   buf[MAX_SIZE_LINE];
 static char   buf[MAX_SIZE_LINE];
+static char   tbl_buf[MAX_SIZE_LINE]; /* current 'table name' buffer */
 static FILE*  rpl;
 static FILE*  rpl;
 static db_con_t*     fifo_db_con=0;
 static db_con_t*     fifo_db_con=0;
 static db_func_t fifo_dbf;
 static db_func_t fifo_dbf;
@@ -705,7 +706,7 @@ int db_fifo( FILE *fifo, char *response_file )
 	}
 	}
 
 
 	/* read the table name */
 	/* read the table name */
-	line.s = buf;
+	line.s = tbl_buf;/*buf;*/
 	if (!read_line( line.s, MAX_SIZE_LINE-1, fifo, &line.len) || !line.len) {
 	if (!read_line( line.s, MAX_SIZE_LINE-1, fifo, &line.len) || !line.len) {
 		double_log("Table name expected");
 		double_log("Table name expected");
 		goto error1;
 		goto error1;