Date: Fri, 27 Dec 2013 20:51:38 +0000 (UTC) From: William Grzybowski <wg@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r337804 - in head/net/minidlna: . files Message-ID: <201312272051.rBRKpcSS016331@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wg Date: Fri Dec 27 20:51:37 2013 New Revision: 337804 URL: http://svnweb.freebsd.org/changeset/ports/337804 Log: net/minidlna: update kqueue patch - Update kqueue patch to workaround issue waiting for the file transfer to complete Submitted by: se Modified: head/net/minidlna/Makefile head/net/minidlna/files/extra-patch-kqueue Modified: head/net/minidlna/Makefile ============================================================================== --- head/net/minidlna/Makefile Fri Dec 27 20:47:30 2013 (r337803) +++ head/net/minidlna/Makefile Fri Dec 27 20:51:37 2013 (r337804) @@ -3,7 +3,7 @@ PORTNAME= minidlna PORTVERSION= 1.1.1 -PORTREVISION= 4 +PORTREVISION= 5 PORTEPOCH= 1 CATEGORIES= net multimedia www MASTER_SITES= SF Modified: head/net/minidlna/files/extra-patch-kqueue ============================================================================== --- head/net/minidlna/files/extra-patch-kqueue Fri Dec 27 20:47:30 2013 (r337803) +++ head/net/minidlna/files/extra-patch-kqueue Fri Dec 27 20:51:37 2013 (r337804) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312272051.rBRKpcSS016331>