From owner-svn-ports-all@FreeBSD.ORG Fri Dec 27 20:51:38 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90FB6CB; Fri, 27 Dec 2013 20:51:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 636E91F58; Fri, 27 Dec 2013 20:51:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRKpcF8016334; Fri, 27 Dec 2013 20:51:38 GMT (envelope-from wg@svn.freebsd.org) Received: (from wg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRKpcSS016331; Fri, 27 Dec 2013 20:51:38 GMT (envelope-from wg@svn.freebsd.org) Message-Id: <201312272051.rBRKpcSS016331@svn.freebsd.org> From: William Grzybowski Date: Fri, 27 Dec 2013 20:51:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r337804 - in head/net/minidlna: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 20:51:38 -0000 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;