head 1.2; access; symbols pkgsrc-2014Q4:1.1.0.18 pkgsrc-2014Q4-base:1.1 pkgsrc-2014Q3:1.1.0.16 pkgsrc-2014Q3-base:1.1 pkgsrc-2014Q2:1.1.0.14 pkgsrc-2014Q2-base:1.1 pkgsrc-2014Q1:1.1.0.12 pkgsrc-2014Q1-base:1.1 pkgsrc-2013Q4:1.1.0.10 pkgsrc-2013Q4-base:1.1 pkgsrc-2013Q3:1.1.0.8 pkgsrc-2013Q3-base:1.1 pkgsrc-2013Q2:1.1.0.6 pkgsrc-2013Q2-base:1.1 pkgsrc-2013Q1:1.1.0.4 pkgsrc-2013Q1-base:1.1 pkgsrc-2012Q4:1.1.0.2 pkgsrc-2012Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2015.01.14.21.32.20; author degroote; state dead; branches; next 1.1; commitid plus0w8rPnJqp26y; 1.1 date 2012.10.15.22.48.01; author drochner; state Exp; branches; next ; desc @@ 1.2 log @Upgrade minidlan to 1.1.4 Changes since 1.0.24: 1.1.4 - Released 26-Aug-2014 -------------------------------- - Add magic container infrastructure. - Add magic containers for 50 recent items for each category. - Fix bad null termination in AAC parsing. - Fix requests for the last byte of a file, which affected MKV playback on Philips TV's. - Support 64-bit time_t values. 1.1.3 - Released 05-June-2014 -------------------------------- - Enhance log level settings. - Fix Samsung browsing when root_container is set. - Add Clang compiling support. - Fix compiling on systems without iconv. - Add merge_media_dirs option, to revert to the old behavior. - Add Asus O!Play client support. - Fix Broken SSDP multicast membership addition. - Fix crash bug with an emtpy filter argument. - Accept SMI subtitles in addition to SRT. - Add BubbleUPnP detection and enable subtitle support. - Allow the user to specify an arbitrary root container. - Add libavcodec > 54 / libav 10 compatibility. - Get embedded cover art from video files with recent libavformat versions. - Disable Samsung DCM10 capability, as it breaks compatibility with new models. - Add subtitle support for NetFront™ Living Connect middleware-based clients. 1.1.2 - Released 06-Mar-2014 -------------------------------- - Show client status on our basic presentation page. - Add a new force_sort_criteria option, to globally override the SortCriteria value sent by the client. - Fix a couple resource leaks. - Add configuration include file support. - Support DLNA/UPnP-AV searches issued by clients using the Grilo framework. - Fix some clients playing artwork instead of movie. - Fix bookmarks on Samsung Series E clients. - Add an extra folder level if there are multiple media locations. - Fix some multicast membership issues with changing network settings. - Make max number of children (connections) configurable. - Fix choppy playback with some file types on Panasonic clients by increasing the max connection limit. 1.1.1 - Released 01-Nov-2013 -------------------------------- - Add network interface monitoring support on Linux. - Don't require a configured network interface to start up. - Fix some minor spec compliance issues. 1.1.0 - Released 04-April-2013 -------------------------------- - Add support for other operating systems. - Switch to autoconf from our handcrafted genconfig.sh. - Add configuration option for UUID. - Add configuration option to specify the user to run as. - Add support for limiting a media dir to multiple media types. - Force a rescan if we detect a new or missing media_dir entry. - Fix crash caused by certain TiVo clients. - Fix crash bug on video files with some ffmpeg library versions. - Add support for TiVo MPEG-TS files. - Add some logging and forking tweaks to work better with systemd. - Validate or escape user input to prevent SQL injection. - Add forced sorting support for Panasonic devices. 1.0.25 - Released 13-July-2012 -------------------------------- - Fix a couple crash bugs on malformed WAV files. - Forcibly tweak the model number for Xbox360 clients, or they might ignore us. - Enable all network interfaces by default if none were specified. - Add flag to force downscaled thumbnails rather than using embedded ones. - Add DirecTV client detection, and fix image resolution issue. - Add support for the latest ffmpeg/libav library versions. - Fix a potential crash on requests for a resize of a non-existent image. - Make DeviceID checking more permissive for Sagem Radio. @ text @$NetBSD: patch-aa,v 1.1 2012/10/15 22:48:01 drochner Exp $ --- uuid.c.orig 2010-11-11 23:48:13.000000000 +0000 +++ uuid.c @@@@ -30,6 +30,7 @@@@ #include #include #include +#include #include #include #include @@@@ -46,16 +47,7 @@@@ static u_int32_t clock_seq; static const u_int32_t clock_seq_max = 0x3fff; /* 14 bits */ static int clock_seq_initialized; -unsigned long long -monotonic_us(void) -{ - struct timespec ts; - - syscall(__NR_clock_gettime, CLOCK_MONOTONIC, &ts); - return ts.tv_sec * 1000000ULL + ts.tv_nsec / 1000; -} - -int +static int read_bootid_node(unsigned char *buf, size_t size) { FILE *boot_id; @@@@ -81,28 +73,17 @@@@ read_bootid_node(unsigned char *buf, siz static void read_random_bytes(unsigned char *buf, size_t size) { - int i; - pid_t pid; - - i = open("/dev/urandom", O_RDONLY); - if(i >= 0) - { - read(i, buf, size); - close(i); - } - /* Paranoia. /dev/urandom may be missing. - * rand() is guaranteed to generate at least [0, 2^15) range, - * but lowest bits in some libc are not so "random". */ - srand(monotonic_us()); - pid = getpid(); - while(1) - { - for(i = 0; i < size; i++) - buf[i] ^= rand() >> 5; - if(pid == 0) - break; - srand(pid); - pid = 0; + long r; +#if 0 + srandomdev(); +#endif + + while ((ssize_t)size > 0) { + r = random(); + memcpy(buf, &r, + size > sizeof(r) ? sizeof(r) : size); + buf += sizeof(r); + size -= sizeof(r); } } @@@@ -162,7 +143,7 @@@@ generate_uuid(unsigned char uuid_out[16] * nanosecond intervals since 00:00:00.00, 15 October 1582 (the date of * Gregorian reform to the Christian calendar). */ - syscall(__NR_clock_gettime, CLOCK_REALTIME, &ts); + clock_gettime(CLOCK_REALTIME, &ts); time_all = ((u_int64_t)ts.tv_sec) * (NSEC_PER_SEC / 100); time_all += ts.tv_nsec / 100; @ 1.1 log @import the FreeBSD port of minidlna, with minor adaptions to make it build and start up on NetBSD not tested with a real media renderer yet @ text @d1 1 a1 1 $NetBSD$ @