From 446b0e8e0b94b997293aef2f63220c5f8a68bf0f Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 22 Jan 2006 18:00:00 +0100 Subject: =?UTF-8?q?Version=201.3.40=20-=20Fixed=20a=20second=20place=20whe?= =?UTF-8?q?re=20a=20message=20should=20be=20given=20when=20an=20instant=20?= =?UTF-8?q?recording=20=20=20is=20started=20(reported=20by=20Jesus=20Bravo?= =?UTF-8?q?=20Alvarez).=20-=20Modified=20logging=20so=20that=20even=20on?= =?UTF-8?q?=20NPTL=20systems=20each=20line=20in=20the=20log=20file=20shows?= =?UTF-8?q?=20=20=20the=20individual=20thread's=20pid=20(based=20on=20a=20?= =?UTF-8?q?suggestion=20from=20Francois-Xavier=20Kowalski).=20-=20Fixed=20?= =?UTF-8?q?a=20problem=20with=20@plugin=20in=20keymacros.conf=20in=20case?= =?UTF-8?q?=20the=20named=20plugin=20is=20not=20=20=20loaded=20(reported?= =?UTF-8?q?=20by=20Franz=20Gangkofer).=20-=20Fixed=20a=20crash=20after=20e?= =?UTF-8?q?xecuting=20the=20SVDRP=20command=20CLRE,=20caused=20by=20dangli?= =?UTF-8?q?ng=20'schedule'=20=20=20pointers=20from=20cChannel=20objects=20?= =?UTF-8?q?(reported=20by=20Malte=20Schr=C3=B6der).=20-=20Updated=20the=20?= =?UTF-8?q?Finnish=20OSD=20texts=20(thanks=20to=20Rolf=20Ahrenberg).=20-?= =?UTF-8?q?=20Improved=20NULL=20checking=20in=20strreplace().=20-=20Fixed?= =?UTF-8?q?=20a=20crash=20in=20the=20Schedule=20menu=20with=20events=20tha?= =?UTF-8?q?t=20have=20no=20title=20(reported=20by=20=20=20Rolf=20Ahrenberg?= =?UTF-8?q?).=20cEvent::FixEpgBugs()=20now=20assigns=20a=20"No=20title"=20?= =?UTF-8?q?string=20to=20events=20=20=20that=20have=20no=20title.=20-=20Up?= =?UTF-8?q?dated=20the=20Estonian=20OSD=20texts=20(thanks=20to=20Arthur=20?= =?UTF-8?q?Konovalov).=20-=20Recordings=20are=20now=20only=20started=20if?= =?UTF-8?q?=20there=20is=20at=20least=20300MB=20free=20disk=20space=20=20?= =?UTF-8?q?=20(suggested=20by=20Markus=20Hahn).=20-=20When=20entering=20te?= =?UTF-8?q?xt=20via=20the=20numeric=20keys,=20the=20cursor=20now=20automat?= =?UTF-8?q?ically=20advances=20=20=20(based=20on=20a=20patch=20from=20Rolf?= =?UTF-8?q?=20Ahrenberg).=20-=20Updated=20the=20Polish=20OSD=20texts=20and?= =?UTF-8?q?=20the=20fontosd-iso8859-2.c=20file=20(thanks=20to=20Jaroslaw?= =?UTF-8?q?=20=20=20Swierczynski).=20-=20Disabled=20the=20"buffer=20reserv?= =?UTF-8?q?e"=20in=20Transfer=20Mode.=20Last=20chance=20to=20complain=20if?= =?UTF-8?q?=20you=20=20=20really=20need=20it=20-=20it=20will=20be=20comple?= =?UTF-8?q?tely=20removed=20in=20the=20next=20version.=20If=20you=20are=20?= =?UTF-8?q?=20=20experiencing=20problems=20with=20a/v=20running=20out=20of?= =?UTF-8?q?=20sync,=20try=20the=20latest=20driver=20and=20=20=20firmware?= =?UTF-8?q?=20(if=20you=20are=20using=20a=20full=20featured=20DVB=20card).?= =?UTF-8?q?=20-=20Switching=20channels=20with=20the=20Up/Down=20or=20Chann?= =?UTF-8?q?el+/Channel-=20keys=20now=20works=20a=20lot=20=20=20faster=20wh?= =?UTF-8?q?en=20the=20repeat=20function=20kicks=20in,=20by=20not=20actuall?= =?UTF-8?q?y=20switching=20the=20=20=20channel=20every=20time,=20but=20rat?= =?UTF-8?q?her=20only=20displaying=20the=20channel=20info=20and=20doing=20?= =?UTF-8?q?=20=20the=20final=20switch=20when=20the=20key=20is=20released.?= =?UTF-8?q?=20-=20The=20channel=20display=20is=20now=20updated=20=5Fbefore?= =?UTF-8?q?=5F=20the=20channel=20is=20switched.=20-=20Added=20a=20missing?= =?UTF-8?q?=20initialization=20of=20'timeout'=20in=20the=20cDisplayChannel?= =?UTF-8?q?=20constructor.=20-=20Fixed=20detecting=20if=20there=20can=20be?= =?UTF-8?q?=20any=20useful=20further=20input=20when=20entering=20channel?= =?UTF-8?q?=20=20=20numbers=20(thanks=20to=20Thomas=20Bergwinkl).=20-=20Up?= =?UTF-8?q?dated=20the=20Spanish=20OSD=20texts=20(thanks=20to=20Jesus=20Br?= =?UTF-8?q?avo=20Alvarez).=20-=20Fixed=20handling=20the=20'0'=20key=20for?= =?UTF-8?q?=20switching=20between=20the=20last=20two=20channels=20(thanks?= =?UTF-8?q?=20=20=20to=20Thomas=20Bergwinkl).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'tools.c') diff --git a/tools.c b/tools.c index 33b2ec6..031c120 100644 --- a/tools.c +++ b/tools.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.110 2006/01/15 14:31:45 kls Exp $ + * $Id: tools.c 1.112 2006/01/20 14:01:28 kls Exp $ */ #include "tools.h" @@ -26,9 +26,22 @@ extern "C" { #include #include #include "i18n.h" +#include "thread.h" int SysLogLevel = 3; +#define MAXSYSLOGBUF 256 + +void syslog_with_tid(int priority, const char *format, ...) +{ + va_list ap; + char fmt[MAXSYSLOGBUF]; + snprintf(fmt, sizeof(fmt), "[%d] %s", cThread::ThreadId(), format); + va_start(ap, format); + vsyslog(priority, fmt, ap); + va_end(ap); +} + int BCD2INT(int x) { return ((1000000 * BCDCHARTOINT((x >> 24) & 0xFF)) + @@ -125,13 +138,14 @@ char *strn0cpy(char *dest, const char *src, size_t n) char *strreplace(char *s, char c1, char c2) { - char *p = s; - - while (p && *p) { - if (*p == c1) - *p = c2; - p++; - } + if (s) { + char *p = s; + while (*p) { + if (*p == c1) + *p = c2; + p++; + } + } return s; } -- cgit v1.2.3