Fixa lite i todo.
This commit is contained in:
parent
f630cbf979
commit
d0d344a78c
2 changed files with 12 additions and 11 deletions
|
|
@ -1,10 +1,8 @@
|
|||
/**
|
||||
* Archived - Inotify based filesystem mirror daemon
|
||||
/*
|
||||
* arch/mysql.c - Handles database operations
|
||||
*
|
||||
* @authors: pnx, tritomI
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2010 Archived
|
||||
* (C) Copyright 2010 Henrik Hautakoski <henrik@unknown.org>
|
||||
* (C) Copyright 2010 Fredric Nilsson <fredric@unknown.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -16,8 +14,7 @@
|
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <mysql/mysql.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* Copyright (C) 2010 Archived
|
||||
*
|
||||
|
|
@ -33,7 +32,9 @@ static struct tree *current = NULL;
|
|||
static void index_entry(struct entry *ent) {
|
||||
|
||||
static char buf[1024];
|
||||
|
||||
#if __DEBUG__
|
||||
printf("DEBUG: index_entry adding to db: %s %s %d\n", ent->base, ent->name, ent->dir);
|
||||
#endif
|
||||
arch_db_insert(ent->base, ent->name, ent->dir);
|
||||
|
||||
if (ent->dir) {
|
||||
|
|
@ -50,7 +51,7 @@ static void index_entry(struct entry *ent) {
|
|||
static void add(const char *path) {
|
||||
|
||||
char *newstr;
|
||||
|
||||
|
||||
if (st_size >= 255)
|
||||
return;
|
||||
|
||||
|
|
@ -131,6 +132,9 @@ void indexer_run(unsigned int num) {
|
|||
}
|
||||
|
||||
index_entry(ent);
|
||||
#if __DEBUG__
|
||||
printf("DEBUG: indexer_run(): ");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue