mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-27 06:33:21 -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
|
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;"
|
#define Q_TMPL "DELETE FROM inotify WHERE wd = %d;"
|
||||||
char *query;
|
char *query;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
query = sqlite3_mprintf(Q_TMPL, wi->wd);
|
query = sqlite3_mprintf(Q_TMPL, wd);
|
||||||
if (!query)
|
if (!query)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_DB, "Out of memory for query string\n");
|
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);
|
db_watch_add(struct watch_info *wi);
|
||||||
|
|
||||||
int
|
int
|
||||||
db_watch_delete_bywd(struct watch_info *wi);
|
db_watch_delete_bywd(uint32_t wd);
|
||||||
|
|
||||||
int
|
int
|
||||||
db_watch_delete_bypath(char *path);
|
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);
|
inotify_rm_watch(inofd, ie->wd);
|
||||||
db_watch_delete_bywd(wi);
|
db_watch_delete_bywd(ie->wd);
|
||||||
|
|
||||||
memset(&we, 0, sizeof(struct watch_enum));
|
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);
|
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);
|
free(wi.path);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user