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
|
* (C) Copyright 2010 Henrik Hautakoski <henrik@unknown.org>
|
||||||
*
|
* (C) Copyright 2010 Fredric Nilsson <fredric@unknown.org>
|
||||||
*
|
|
||||||
* Copyright (C) 2010 Archived
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* 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
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* 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>
|
#include <mysql/mysql.h>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 Archived
|
* Copyright (C) 2010 Archived
|
||||||
*
|
*
|
||||||
|
|
@ -33,7 +32,9 @@ static struct tree *current = NULL;
|
||||||
static void index_entry(struct entry *ent) {
|
static void index_entry(struct entry *ent) {
|
||||||
|
|
||||||
static char buf[1024];
|
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);
|
arch_db_insert(ent->base, ent->name, ent->dir);
|
||||||
|
|
||||||
if (ent->dir) {
|
if (ent->dir) {
|
||||||
|
|
@ -131,6 +132,9 @@ void indexer_run(unsigned int num) {
|
||||||
}
|
}
|
||||||
|
|
||||||
index_entry(ent);
|
index_entry(ent);
|
||||||
|
#if __DEBUG__
|
||||||
|
printf("DEBUG: indexer_run(): ");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue