From d0d344a78c38213aa599d30b1bd82e7ed95d441d Mon Sep 17 00:00:00 2001 From: Fredric N Date: Wed, 28 Apr 2010 22:21:57 +0200 Subject: [PATCH] Fixa lite i todo. --- src/arch/mysql.c | 13 +++++-------- src/indexer.c | 10 +++++++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/arch/mysql.c b/src/arch/mysql.c index 0d663fb..3266b39 100644 --- a/src/arch/mysql.c +++ b/src/arch/mysql.c @@ -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 + * (C) Copyright 2010 Fredric Nilsson * * 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 . + * */ #include diff --git a/src/indexer.c b/src/indexer.c index adb5b74..b3fb337 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -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 } }