diff options
author | wg <wg@FreeBSD.org> | 2013-12-28 04:51:37 +0800 |
---|---|---|
committer | wg <wg@FreeBSD.org> | 2013-12-28 04:51:37 +0800 |
commit | d30486ae68658d4ee1399a92a07e19a03f3eb12a (patch) | |
tree | d8d664a5d4e0ac58553b34d7a8f1b53035dfdbe4 /net/minidlna | |
parent | 64f942ec34ec384b040eb8c1263f8d29e93ac8a0 (diff) | |
download | freebsd-ports-gnome-d30486ae68658d4ee1399a92a07e19a03f3eb12a.tar.gz freebsd-ports-gnome-d30486ae68658d4ee1399a92a07e19a03f3eb12a.tar.zst freebsd-ports-gnome-d30486ae68658d4ee1399a92a07e19a03f3eb12a.zip |
net/minidlna: update kqueue patch
- Update kqueue patch to workaround issue waiting for the file transfer to
complete
Submitted by: se
Diffstat (limited to 'net/minidlna')
-rw-r--r-- | net/minidlna/Makefile | 2 | ||||
-rw-r--r-- | net/minidlna/files/extra-patch-kqueue | 38 |
2 files changed, 38 insertions, 2 deletions
diff --git a/net/minidlna/Makefile b/net/minidlna/Makefile index caf88b4e4057..c7ab59c0fccb 100644 --- a/net/minidlna/Makefile +++ b/net/minidlna/Makefile @@ -3,7 +3,7 @@ PORTNAME= minidlna PORTVERSION= 1.1.1 -PORTREVISION= 4 +PORTREVISION= 5 PORTEPOCH= 1 CATEGORIES= net multimedia www MASTER_SITES= SF diff --git a/net/minidlna/files/extra-patch-kqueue b/net/minidlna/files/extra-patch-kqueue index 39a6d541467d..8f049c0bc0d8 100644 --- a/net/minidlna/files/extra-patch-kqueue +++ b/net/minidlna/files/extra-patch-kqueue @@ -801,7 +801,7 @@ return (ret != SQLITE_OK); } ---- upnpevents.c~ 2013-11-02 02:06:41.000000000 +0100 +--- upnpevents.c.orig 2013-11-02 02:06:41.000000000 +0100 +++ upnpevents.c 2013-12-24 12:22:41.533935174 +0100 @@ -416,6 +416,10 @@ { @@ -814,3 +814,39 @@ DPRINTF(E_DEBUG, L_HTTP, "upnpevents_selectfds: %p %d %d\n", obj, obj->state, obj->s); if(obj->s >= 0) { +--- inotify.c.orig 2013-12-26 13:49:59.985302596 +0000 ++++ inotify.c 2013-12-26 13:50:04.281302535 +0000 +@@ -336,6 +336,7 @@ + media_types types = ALL_MEDIA; + struct media_dir_s * media_path = media_dirs; + struct stat st; ++ struct timeval now; + + DPRINTF(E_DEBUG, L_INOTIFY, "inotify_insert_file: %s @ %s\n", name, path); + +@@ -402,6 +403,16 @@ + if( stat(path, &st) != 0 ) + return -1; + ++ (void)gettimeofday(&now, NULL); ++ while (now.tv_sec < st.st_mtime + 3) ++ { ++ DPRINTF(E_DEBUG, L_INOTIFY, "Sleeping until %s is stable for a few seconds ...\n", path); ++ sleep(1); ++ (void)gettimeofday(&now, NULL); ++ if (stat(path, &st) != 0) ++ return -1; ++ } ++ + ts = sql_get_int_field(db, "SELECT TIMESTAMP from DETAILS where PATH = '%q'", path); + if( !ts && is_playlist(path) && (sql_get_int_field(db, "SELECT ID from PLAYLISTS where PATH = '%q'", path) > 0) ) + { +@@ -472,7 +483,7 @@ + if( (is_audio(path) || is_playlist(path)) && next_pl_fill != 1 ) + { + next_pl_fill = time(NULL) + 120; // Schedule a playlist scan for 2 minutes from now. +- //DEBUG DPRINTF(E_WARN, L_INOTIFY, "Playlist scan scheduled for %s", ctime(&next_pl_fill)); ++ DPRINTF(E_WARN, L_INOTIFY, "Playlist scan scheduled for %s", ctime(&next_pl_fill)); + } + } + return depth; |