From patchwork Sun Sep 4 12:33:41 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carsten Koch X-Patchwork-Id: 12009 Received: from melpumpe.icem.de ([158.225.1.2] helo=mail.icem.de) by www.linuxtv.org with esmtp (Exim 4.34) id 1EBtgx-0002CV-46 for vdr@linuxtv.org; Sun, 04 Sep 2005 14:33:47 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.icem.de (Postfix) with ESMTP id BE4DA125CA9 for ; Sun, 4 Sep 2005 14:33:47 +0200 (CEST) Received: from mail.icem.de ([127.0.0.1]) by localhost (melpumpe [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29211-02; Sun, 4 Sep 2005 14:33:45 +0200 (CEST) Received: from [192.168.25.3] (wald3.icemnet.de [192.168.25.3]) by mail.icem.de (Postfix) with ESMTP id 7B4B2125BD7 for ; Sun, 4 Sep 2005 14:33:44 +0200 (CEST) Message-ID: <431AE9A5.6080801@icem.com> Date: Sun, 04 Sep 2005 14:33:41 +0200 From: Carsten Koch User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR Subject: Re: [vdr] valid summary.vdr file hangs vdr. References: <4314DC57.1020303@icem.com> <43185117.6010604@cadsoft.de> <43185606.9080902@icem.com> <431856D8.2050008@cadsoft.de> In-Reply-To: <431856D8.2050008@cadsoft.de> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at icem.com X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2005 12:33:47 -0000 Status: O X-Status: X-Keywords: X-UID: 4747 Klaus Schmidinger wrote: ... >> Of course my point is that VDR should never hang when >> reading a file that it has created itself. >> Would you like me to create a patch this weekend that >> fixes this? > > Very well. And don't forget to adjust summary2info.pl as well. I am sorry, I do not know perl. I went straight to Python in my evolution. ;-) Anyway, as promised, here is the patch that does not only prevent VDR from hanging/crashing (*), but also displays summaries that do not have a short text correctly. Carsten. (*) During my tests today, vdr crashed with these messages: Sep 4 13:34:08 vdr kernel: dvb-ttpci: warning: timeout waiting in BlitBitmap: 0, 1 Sep 4 13:34:10 vdr kernel: dvb-ttpci: __av7110_send_fw_cmd(): timeout waiting for COMMAND idle Sep 4 13:34:10 vdr kernel: dvb-ttpci: av7110_send_fw_cmd(): av7110_send_fw_cmd error -110 Sep 4 13:34:10 vdr kernel: dvb-ttpci: av7110_fw_cmd error -110 Sep 4 13:34:15 vdr kernel: dvb-ttpci: ARM crashed @ card 0 Sep 4 13:34:16 vdr kernel: dvb-ttpci: gpioirq unknown type=0 len=0 Sep 4 13:34:16 vdr kernel: dvb-ttpci: adac type set to 0 @ card 0 diff -ur vdr-1.3.31/recording.c vdr-1.3.31+FixSummaryHang/recording.c --- vdr-1.3.31/recording.c 2005-08-13 16:00:48.000000000 +0200 +++ vdr-1.3.31+FixSummaryHang/recording.c 2005-09-04 14:23:35.814605968 +0200 @@ -500,6 +500,20 @@ data[2] = data[1]; data[1] = NULL; } + else if (line == 2) { + // if line 1 is too long, it can't be the short text, + // so assume the short text is missing and concatenate + // line 1 and line 2 to be the long text. + size_t len1 = strlen(data[1]); + if (len1 > 80) { + data[1] = (char *)realloc(data[1], len1 + 1 + strlen(data[2]) + 1); + strcat(data[1], "\n"); + strcat(data[1], data[2]); + free(data[2]); + data[2] = data[1]; + data[1] = NULL; + } + } info->SetData(data[0], data[1], data[2]); for (int i = 0; i < 3; i ++) free(data[i]);