diff --git a/lib/timerdclient/timerdclient.cpp b/lib/timerdclient/timerdclient.cpp index 7792a6135..d10fee387 100644 --- a/lib/timerdclient/timerdclient.cpp +++ b/lib/timerdclient/timerdclient.cpp @@ -347,7 +347,7 @@ int CTimerdClient::addTimerEvent( CTimerd::CTimerEventTypes evType, void* data, tri.recordingSafety = ri->recordingSafety; tri.autoAdjustToEPG = ri->autoAdjustToEPG; tri.channel_ci = ri->channel_ci; //NI - strncpy(tri.recordingDir, ri->recordingDir, RECORD_DIR_MAXLEN-1); + strncpy(tri.recordingDir, ri->recordingDir, RECORD_DIR_MAXLEN); length = sizeof( CTimerd::TransferRecordingInfo); data = &tri; } diff --git a/lib/timerdclient/timerdclient.h b/lib/timerdclient/timerdclient.h index ded8187ad..55d4637e4 100644 --- a/lib/timerdclient/timerdclient.h +++ b/lib/timerdclient/timerdclient.h @@ -121,7 +121,7 @@ class CTimerdClient:private CBasicClient eventInfo.recordingSafety = safety; eventInfo.autoAdjustToEPG = autoAdjust; eventInfo.channel_ci = channel_ci; //NI - strncpy(eventInfo.recordingDir, recDir.c_str(), RECORD_DIR_MAXLEN); + strncpy(eventInfo.recordingDir, recDir.c_str(), RECORD_DIR_MAXLEN-1); return addTimerEvent(CTimerd::TIMER_RECORD, &eventInfo, announcetime, alarmtime, stoptime, evrepeat, repeatcount,forceAdd); }; diff --git a/lib/timerdclient/timerdtypes.h b/lib/timerdclient/timerdtypes.h index 435609ac0..b34c8860c 100644 --- a/lib/timerdclient/timerdtypes.h +++ b/lib/timerdclient/timerdtypes.h @@ -34,7 +34,7 @@ #define REMINDER_MESSAGE_MAXLEN 31 #define EXEC_PLUGIN_NAME_MAXLEN 256 -#define RECORD_DIR_MAXLEN 1024 +#define RECORD_DIR_MAXLEN 1025 #define EPG_TITLE_MAXLEN 51 #define TIMERD_APIDS_CONF 0x00 @@ -46,14 +46,14 @@ class CTimerd { public: - enum CTimerEventRepeat - { + enum CTimerEventRepeat + { TIMERREPEAT_ONCE = 0, - TIMERREPEAT_DAILY, - TIMERREPEAT_WEEKLY, - TIMERREPEAT_BIWEEKLY, - TIMERREPEAT_FOURWEEKLY, - TIMERREPEAT_MONTHLY, + TIMERREPEAT_DAILY, + TIMERREPEAT_WEEKLY, + TIMERREPEAT_BIWEEKLY, + TIMERREPEAT_FOURWEEKLY, + TIMERREPEAT_MONTHLY, TIMERREPEAT_BYEVENTDESCRIPTION, TIMERREPEAT_WEEKDAYS = 0x100 // Bits 9-15 specify weekdays (9=mo,10=di,...) }; @@ -71,14 +71,14 @@ class CTimerd TIMER_IMMEDIATE_RECORD, TIMER_REMOTEBOX }; - - enum CTimerEventStates - { - TIMERSTATE_SCHEDULED, - TIMERSTATE_PREANNOUNCE, - TIMERSTATE_ISRUNNING, - TIMERSTATE_HASFINISHED, - TIMERSTATE_TERMINATED + + enum CTimerEventStates + { + TIMERSTATE_SCHEDULED, + TIMERSTATE_PREANNOUNCE, + TIMERSTATE_ISRUNNING, + TIMERSTATE_HASFINISHED, + TIMERSTATE_TERMINATED }; struct EventInfo @@ -148,7 +148,7 @@ class CTimerd }; struct responseGetTimer - { + { int eventID; CTimerEventTypes eventType; CTimerEventStates eventState; @@ -170,13 +170,13 @@ class CTimerd int rem_pre; int rem_post; bool channel_ci; //NI - + bool operator< (const responseGetTimer& a) const { return this->alarmTime < a.alarmTime ; } }; - + typedef std::vector TimerList; }; #endif