From c81b33bd0207b7865298274a879596407a470fd7 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Thu, 11 Jun 2009 16:47:15 +0200 Subject: [PATCH] Bring db_watch_delete_bywd() prototype back in line with other db_watch_delete_by*() --- src/db.c | 4 ++-- src/db.h | 2 +- src/filescanner.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/db.c b/src/db.c index 79745f25..3422761f 100644 --- a/src/db.c +++ b/src/db.c @@ -2230,13 +2230,13 @@ db_watch_delete_byquery(char *query) } int -db_watch_delete_bywd(struct watch_info *wi) +db_watch_delete_bywd(uint32_t wd) { #define Q_TMPL "DELETE FROM inotify WHERE wd = %d;" char *query; int ret; - query = sqlite3_mprintf(Q_TMPL, wi->wd); + query = sqlite3_mprintf(Q_TMPL, wd); if (!query) { DPRINTF(E_LOG, L_DB, "Out of memory for query string\n"); diff --git a/src/db.h b/src/db.h index 568ebe13..d90e8a0a 100644 --- a/src/db.h +++ b/src/db.h @@ -302,7 +302,7 @@ int db_watch_add(struct watch_info *wi); int -db_watch_delete_bywd(struct watch_info *wi); +db_watch_delete_bywd(uint32_t wd); int db_watch_delete_bypath(char *path); diff --git a/src/filescanner.c b/src/filescanner.c index 1d524503..fe42b397 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -718,7 +718,7 @@ process_inotify_dir(struct watch_info *wi, char *path, struct inotify_event *ie) */ inotify_rm_watch(inofd, ie->wd); - db_watch_delete_bywd(wi); + db_watch_delete_bywd(ie->wd); memset(&we, 0, sizeof(struct watch_enum)); @@ -919,7 +919,7 @@ inotify_cb(int fd, short event, void *arg) { DPRINTF(E_DBG, L_SCAN, "%s deleted or backing filesystem unmounted!\n", wi.path); - db_watch_delete_bywd(&wi); + db_watch_delete_bywd(ie->wd); free(wi.path); continue; }