Archived
1
0
Fork 0

Fixa lite i todo.

This commit is contained in:
Fredric N 2010-04-28 22:21:57 +02:00 committed by Henrik Hautakoski
parent f630cbf979
commit d0d344a78c
2 changed files with 12 additions and 11 deletions

View file

@ -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>

View file

@ -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) {
@ -50,7 +51,7 @@ static void index_entry(struct entry *ent) {
static void add(const char *path) { static void add(const char *path) {
char *newstr; char *newstr;
if (st_size >= 255) if (st_size >= 255)
return; return;
@ -131,6 +132,9 @@ void indexer_run(unsigned int num) {
} }
index_entry(ent); index_entry(ent);
#if __DEBUG__
printf("DEBUG: indexer_run(): ");
#endif
} }
} }