Remove unused toplevel watch attribute

This commit is contained in:
Julien BLACHE 2009-06-11 17:36:13 +02:00
parent c81b33bd02
commit 30204cbb76
3 changed files with 3 additions and 11 deletions

View File

@ -206,7 +206,6 @@ static struct col_type_map wi_cols_map[] =
{ wi_offsetof(wd), DB_TYPE_INT },
{ wi_offsetof(cookie), DB_TYPE_INT },
{ wi_offsetof(path), DB_TYPE_STRING },
{ wi_offsetof(toplevel), DB_TYPE_INT },
{ wi_offsetof(libidx), DB_TYPE_INT },
};
@ -2174,12 +2173,12 @@ db_watch_clear(void)
int
db_watch_add(struct watch_info *wi)
{
#define Q_TMPL "INSERT INTO inotify (wd, cookie, path, toplevel, libidx) VALUES (%d, 0, '%q', %d, %d);"
#define Q_TMPL "INSERT INTO inotify (wd, cookie, path, libidx) VALUES (%d, 0, '%q', %d);"
char *query;
char *errmsg;
int ret;
query = sqlite3_mprintf(Q_TMPL, wi->wd, wi->path, wi->toplevel, wi->libidx);
query = sqlite3_mprintf(Q_TMPL, wi->wd, wi->path, wi->libidx);
if (!query)
{
DPRINTF(E_LOG, L_DB, "Out of memory for query string\n");
@ -2741,7 +2740,6 @@ db_perthread_deinit(void)
" wd INTEGER PRIMARY KEY NOT NULL," \
" cookie INTEGER NOT NULL," \
" path VARCHAR(4096) NOT NULL," \
" toplevel INTEGER NOT NULL," \
" libidx INTEGER NOT NULL" \
");"

View File

@ -179,7 +179,6 @@ struct watch_info {
int wd;
char *path;
uint32_t cookie;
int toplevel;
int libidx;
};

View File

@ -49,7 +49,6 @@
#define F_SCAN_BULK (1 << 0)
#define F_SCAN_TOPDIR (1 << 1)
struct deferred_pl {
char *path;
@ -539,7 +538,6 @@ process_directory(int libidx, char *path, int flags)
wi.libidx = libidx;
wi.cookie = 0;
wi.toplevel = ((flags & F_SCAN_TOPDIR) != 0);
wi.path = path;
db_watch_add(&wi);
@ -556,9 +554,6 @@ process_directories(int libidx, char *root, int flags)
if (scan_exit)
return;
if (flags & F_SCAN_TOPDIR)
flags &= ~F_SCAN_TOPDIR;
while ((path = pop_dir()))
{
process_directory(libidx, path, flags);
@ -598,7 +593,7 @@ bulk_scan(void)
{
path = cfg_getnstr(lib, "directories", j);
process_directories(i, path, F_SCAN_BULK | F_SCAN_TOPDIR);
process_directories(i, path, F_SCAN_BULK);
if (scan_exit)
return;