diff --git a/ChangeLog b/ChangeLog index 849d678e..8ed04e58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20573,3 +20573,10 @@ 'SERVICES.MUS_TRACK_CART', 'SERVICES.MUS_BREAK_STRING', 'SERVICES.MUS_TRACK_STRING', 'SERVICES.PROGRAM_CODE' and 'SERVICES.DESCRIPTION' fields when using an exemplar. +2020-11-15 Fred Gleason + * Fixed a bug in rdlogmanager(1) that, after detection of a + linker error, caused subsequent linker errors to fail to be + appended to the error report. + * Fixed a bug in rdlogmanager(1) that caused second and subsequent + inline Track Markers or Markers within an Event to fail to be + inserted Relative Position mode. diff --git a/lib/rdsvc.cpp b/lib/rdsvc.cpp index 80fa800d..b19e4fac 100644 --- a/lib/rdsvc.cpp +++ b/lib/rdsvc.cpp @@ -742,7 +742,7 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str, int prev_hour=0; int prev_secs=0; int prev_length=0; - unsigned prev_id=0; + QList prev_ids; sql=QString("select ")+ "ID,"+ // 00 @@ -757,7 +757,7 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str, while(q->next()) { if((!q->value(1).isNull())&&(!q->value(2).isNull())&& (!q->value(3).isNull())) { - if(prev_id!=0) { + if(prev_ids.size()>0) { int len=1000*(q->value(2).toInt()-prev_secs)-prev_length; if(len<0) { len=0; @@ -766,19 +766,40 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str, QString().sprintf("START_HOUR=%d,",prev_hour)+ QString().sprintf("START_SECS=%d,",prev_secs+prev_length/1000)+ QString().sprintf("LENGTH=%d ",len)+ - QString().sprintf("where ID=%u",prev_id); + "where "; + for(int i=0;ivalue(1).toInt(); prev_secs=q->value(2).toInt(); prev_length=q->value(3).toInt(); } else { - prev_id=q->value(0).toUInt(); + prev_ids.push_back(q->value(0).toUInt()); } } delete q; + + // + // Handle trailing implied start time events + // + if(prev_ids.size()>0) { + sql=QString("update IMPORTER_LINES set ")+ + QString().sprintf("START_HOUR=%d,",prev_hour)+ + QString().sprintf("START_SECS=%d,",prev_secs+prev_length/1000)+ + "LENGTH=0 "+ + "where "; + for(int i=0;inext()) { switch((RDLogLine::Type)q->value(1).toUInt()) { case RDLogLine::Marker: - *err_msg=MakeErrorLine(0,q->value(0).toUInt(), + *err_msg+=MakeErrorLine(0,q->value(0).toUInt(), tr("invalid start time and/or length on note cart.")); break; case RDLogLine::TrafficLink: - *err_msg=MakeErrorLine(0,q->value(0).toUInt(), + *err_msg+=MakeErrorLine(0,q->value(0).toUInt(), tr("invalid start time and/or length on inline traffic break.")); break; case RDLogLine::Track: - *err_msg=MakeErrorLine(0,q->value(0).toUInt(), + *err_msg+=MakeErrorLine(0,q->value(0).toUInt(), tr("invalid start time and/or length on track marker.")); break; @@ -1874,7 +1895,7 @@ bool RDSvc::ResolveInlineTrafficLinks(const QString &logname,QString *err_msg) case RDLogLine::Chain: case RDLogLine::MusicLink: case RDLogLine::UnknownType: - *err_msg=MakeErrorLine(0,q->value(0).toUInt(), + *err_msg+=MakeErrorLine(0,q->value(0).toUInt(), tr("unexpected event type")+ " \""+RDLogLine::typeText((RDLogLine::Type)q->value(1).toUInt())+"\""); break; diff --git a/lib/rdsvc.h b/lib/rdsvc.h index 2122f273..5d3b08a1 100644 --- a/lib/rdsvc.h +++ b/lib/rdsvc.h @@ -121,7 +121,7 @@ class RDSvc : public QObject QString *label_cart,QString *track_cart); bool CheckId(std::vector *v,int value); QString MakeErrorLine(int indent,unsigned lineno,const QString &msg) const; - bool ResolveInlineTrafficLinks(const QString &logname,QString *err_msg) const; + bool ResolveInlineEvents(const QString &logname,QString *err_msg) const; QString svc_name; RDStation *svc_station; RDConfig *svc_config;