[vdr] VDR-1.3.46 Segmentation fault
linux at youmustbejoking.demon.co.uk
Mon Apr 10 21:32:12 CEST 2006
I demand that Klaus Schmidinger may or may not have written...
> Darren Salt wrote:
>> I demand that Dr. Werner Fink may or may not have written...
>>> On Mon, Apr 10, 2006 at 02:50:35AM +0100, Darren Salt wrote:
>>>> Full patch attached. On enabling the "set time from broadcast" function,
>>>> default to the first available channel.
>>> Hmmm... strdup() can return NULL if the system is low at or out of
>> True, but that probably doesn't matter here: something's going to fail
>> anyway if that happens. Perhaps a wrapper is needed?
> Memory is allocated and freed throughout the program all the time. I don't
> see how it could reasonably be made to cope with running out of memory.
</AOL>, though that's not the reason for the wrapper:
char *my_strdup (const char *str)
return str ? strdup (str) : NULL;
would do very nicely.
> Back to the original problem.
> I prefer this fix:
> --- menuitems.c 2006/04/09 13:10:02 1.36
> +++ menuitems.c 2006/04/10 06:31:02
> @@ -572,7 +572,7 @@
> snprintf(buf, sizeof(buf), "%d %s", *value, channel ? channel->Name() : "");
> - else
> + else if (noneString)
That still leaves no selected multiplex when "set time from broadcast" is
initially enabled (i.e. TimeSource = 0, TimeTransponder = 0) - and your
preferred fix will cause cMenuEditChanItem::Set() to do nothing. Is this
intended? If not, then you should consider the second part of my patch.
BTW, what should happen to that setting when all entries for the channels in
that multiplex are deleted?
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Travel less. Share transport more. PRODUCE LESS CARBON DIOXIDE.
When things are going well, something will go wrong.
More information about the vdr