mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-26 14:13:18 -05:00
Bring db_watch_delete_bywd() prototype back in line with other db_watch_delete_by*()
This commit is contained in:
parent
582f0e6746
commit
c81b33bd02
4
src/db.c
4
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");
|
||||
|
2
src/db.h
2
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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user