Remove unused toplevel watch attribute
This commit is contained in:
parent
c81b33bd02
commit
30204cbb76
6
src/db.c
6
src/db.c
|
@ -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" \
|
||||
");"
|
||||
|
||||
|
|
1
src/db.h
1
src/db.h
|
@ -179,7 +179,6 @@ struct watch_info {
|
|||
int wd;
|
||||
char *path;
|
||||
uint32_t cookie;
|
||||
int toplevel;
|
||||
int libidx;
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue