From patchwork Wed Dec 25 11:32:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 21302 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1Vvmhw-0000ca-CL; Wed, 25 Dec 2013 12:33:00 +0100 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1Vvmht-0000cU-2e for vdr@linuxtv.org; Wed, 25 Dec 2013 12:32:58 +0100 X-tubIT-Incoming-IP: 188.40.50.18 Received: from racoon.tvdr.de ([188.40.50.18]) by mail.tu-berlin.de (exim-4.72/mailfrontend-7) with esmtps [TLSv1:AES256-SHA:256] for id 1Vvmhr-0002ol-29; Wed, 25 Dec 2013 12:32:56 +0100 Received: from dolphin.tvdr.de (dolphin.tvdr.de [192.168.100.2]) by racoon.tvdr.de (8.14.5/8.14.5) with ESMTP id rBPBWq6U015438 for ; Wed, 25 Dec 2013 12:32:53 +0100 Received: from [192.168.100.11] (falcon.tvdr.de [192.168.100.11]) by dolphin.tvdr.de (8.14.4/8.14.4) with ESMTP id rBPBWldF017410 for ; Wed, 25 Dec 2013 12:32:47 +0100 Message-ID: <52BAC25F.5090202@tvdr.de> Date: Wed, 25 Dec 2013 12:32:47 +0100 From: Klaus Schmidinger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: vdr@linuxtv.org References: <529CBB75.2020804@tvdr.de> <529CBC57.7060008@tvdr.de> In-Reply-To: X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.12.25.112416 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, SUPERLONG_LINE 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_MEDIA_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_MSGID 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __MOZILLA_USER_AGENT 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' X-LSpam-Score: -1.1 (-) X-LSpam-Report: No, score=-1.1 required=5.0 tests=BAYES_00=-1.9, RDNS_NONE=0.793, URIBL_BLOCKED=0.001 autolearn=no Subject: Re: [vdr] vdr 2.1.2 segfaults in libc using vdr --genindex X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: vdr-bounces@linuxtv.org Errors-To: vdr-bounces@linuxtv.org On 02.12.2013 20:31, Lou wrote: > Am 02.12.2013, 17:59 Uhr, schrieb Klaus Schmidinger : > >>> >>> I guess this was caused by the changes to videodir.[ch]. >>> For a quick fix you could try moving the line >>> >>> cVideoDirectory::SetName(VideoDirectory); >>> >>> into the >>> >>> case 'v': VideoDirectory = optarg; >>> while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/') >>> optarg[strlen(optarg) - 1] = 0; >>> cVideoDirectory::SetName(VideoDirectory); // <----- here! >>> break; >>> >>> in vdr.c >> >> Oh, and use the option '-v'... >> This is just a quick hack - I'll need to give this more thought. >> >> Klaus > > Thanks Klaus, this fixes things temporarily, but I agree it's annoying to set --video as well. Especially since you also have to remember setting --video first, THEN call --genindex. If you have it the wrong way around, it will segfault again ... This should do it: ------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- I'll need your full name if you want to be listed in the HISTORY/CONTRIBUTORS files. Klaus --- vdr.c 2013/12/25 11:01:28 3.6 +++ vdr.c 2013/12/25 11:24:26 @@ -223,6 +223,7 @@ VdrUser = VDR_USER; #endif + cVideoDirectory::SetName(VideoDirectory); cPluginManager PluginManager(DEFAULTPLUGINDIR); static struct option long_options[] = { @@ -443,6 +444,7 @@ case 'v': VideoDirectory = optarg; while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/') optarg[strlen(optarg) - 1] = 0; + cVideoDirectory::SetName(VideoDirectory); break; case 'w': if (isnumber(optarg)) { int t = atoi(optarg); @@ -663,7 +665,6 @@ // Directories: - cVideoDirectory::SetName(VideoDirectory); if (!ConfigDirectory) ConfigDirectory = DEFAULTCONFDIR; cPlugin::SetConfigDirectory(ConfigDirectory);