Here's the code protion that throws the error, but I don't grok enough of the
code to tell why.
Help?
void DvbPanel::checkTimers()
{
int i, j, ret;
bool live=false;
RecTimer *t;
ChannelDesc *chan;
QDateTime cur=QDateTime::currentDateTime();
DvbStream *d;
for ( i=0; i<(int)timers.count(); i++ ) {
t = timers.at(i);
if ( t->running )
continue;
if ( t->begin<=cur &&
cur<t->begin.addSecs(QTime().secsTo(t->duration)) ) {
chan = 0;
for ( j=0; j<(int)channels.count(); j++ ) {
if ( channels.at(j)->name==t->channel ) {
chan = channels.at(j);
break;
}
}
if ( !chan )
continue;
d = getWorkingDvb( 3, chan );
live = false;
if ( d )
ret = d->canStartTimer( live, chan );
else
ret = -1;
if ( ret==0 ) {
if ( live ) {
stopLive();
emit dvbStop();
}
if ( d->startTimer( chan, dvbConfig->recordDir, dvbConfig->sizeFile, t,
dvbConfig->filenameFormat ) ) {
KProcess proc;
proc << QDir::homeDirPath()+"/bin/kaffeine_recording";
proc << "On";
proc.start( KProcess::DontCare );
t->running = 1;
if ( timersDialog )
emit timersChanged();
saveTimerList();
i--;
}
else
fprintf( stderr, "start timer failed!!!\n" );
}
else
fprintf( stderr, "Cant start timer !!!\n" );
}
else if ( t->mode ) {
if
(t->begin.addSecs(t->duration.hour()*3600+t->duration.minute()*60+60)<cur) {
updateModeTimer( t );
if ( timersDialog )
emit timersChanged();
}
}
}
}