From patchwork Mon Nov 27 21:34:29 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anssi Hannula X-Patchwork-Id: 12408 Received: from pne-smtpout4-sn2.hy.skanova.net ([81.228.8.154]) by www.linuxtv.org with esmtp (Exim 4.50) id 1Goo81-0003B5-PP for vdr@linuxtv.org; Mon, 27 Nov 2006 22:35:05 +0100 Received: from mail.onse.fi (80.223.77.223) by pne-smtpout4-sn2.hy.skanova.net (7.2.075) id 44A2EAB8006C8A5D for vdr@linuxtv.org; Mon, 27 Nov 2006 22:34:30 +0100 Received: from [10.0.0.3] (kone [10.0.0.3]) by mail.onse.fi (Postfix) with ESMTP id 2A0F753A013C for ; Mon, 27 Nov 2006 23:34:30 +0200 (EET) Message-ID: <456B59E5.6010103@gmail.com> Date: Mon, 27 Nov 2006 23:34:29 +0200 From: Anssi Hannula User-Agent: Thunderbird 1.5.0.8 (X11/20061109) MIME-Version: 1.0 To: VDR Mailing List Subject: Re: [vdr] Rotor plugin give Seg Fault -- need help! References: <1164391110.7339.1.camel@localhost.localdomain> In-Reply-To: <1164391110.7339.1.camel@localhost.localdomain> X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 21:35:05 -0000 Status: O X-Status: X-Keywords: X-UID: 11279 mlists wrote: > Hi there, trying to set up the Rotor plugin but running into issues. > When I fire up VDR 1.4.4 with my Twinhan 1020a card, and a diseqc rotor > with GOTOX, I can go to the configure menu for the plugin rotor, but > when I select rotor from the main menu, vdr immediately seg faults and > stops. > > Has anyone seen this, and if so, is there a fix to the problem? Please try the attached patch. --- rotor.c.old 2006-06-14 23:44:27.000000000 +0200 +++ rotor.c 2006-06-14 23:46:43.000000000 +0200 @@ -96,7 +96,8 @@ continue; if ((diseqc=Diseqcs.Get(source->Code(),12000,'h')) || (diseqc=Diseqcs.Get(source->Code(),12000,'v')) || (diseqc=Diseqcs.Get(source->Code(),12000,'l')) || (diseqc=Diseqcs.Get(source->Code(),12000,'r'))) { - char *c=strdup(diseqc->Commands()); + char *commandstring=strdup(diseqc->Commands()); + char *c=commandstring; while (c = strchr(c, '[')) { char *e = strchr(++c, ']'); @@ -131,7 +132,7 @@ break; } } - free(c); + free(commandstring); } cRotorPos *p = RotorPositions.GetfromSource(source->Code()); if (p==RotorPositions.First())