Bring db_watch_delete_bywd() prototype back in line with other db_watch_delete_by*()

This commit is contained in:
Julien BLACHE 2009-06-11 16:47:15 +02:00
parent 582f0e6746
commit c81b33bd02
3 changed files with 5 additions and 5 deletions

View File

@ -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");

View File

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

View File

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