2023-04-19 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in the log importer code that threw SQL errors when
	attempting to process traffic log imports.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-04-19 12:49:45 -04:00
parent afd60a8a51
commit 73dd55bf08
2 changed files with 16 additions and 6 deletions

View File

@ -24032,3 +24032,6 @@
2023-04-17 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdrssd(8) that caused a segfault when
attempting to report a failed feed update in syslog.
2023-04-19 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the log importer code that threw SQL errors when
attempting to process traffic log imports.

View File

@ -550,12 +550,19 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
"`"+src_str+"LEN_MINUTES_OFFSET`,"+ // 18
"`"+src_str+"LEN_MINUTES_LENGTH`,"+ // 19
"`"+src_str+"LEN_SECONDS_OFFSET`,"+ // 20
"`"+src_str+"LEN_SECONDS_LENGTH`,"+ // 21
"`"+src_str+"TRANS_TYPE_OFFSET`,"+ // 22
"`"+src_str+"TRANS_TYPE_LENGTH`,"+ // 23
"`"+src_str+"TIME_TYPE_OFFSET`,"+ // 24
"`"+src_str+"TIME_TYPE_LENGTH` "+ // 25
"from "+parser_table+" where `NAME`='"+RDEscapeString(parser_name)+"'";
"`"+src_str+"LEN_SECONDS_LENGTH`"; // 21
if(src==RDSvc::Music) {
sql+=QString(",")+
"`"+src_str+"TRANS_TYPE_OFFSET`,"+ // 22
"`"+src_str+"TRANS_TYPE_LENGTH`,"+ // 23
"`"+src_str+"TIME_TYPE_OFFSET`,"+ // 24
"`"+src_str+"TIME_TYPE_LENGTH` "; // 25
}
else {
sql+=" ";
}
sql+="from "+parser_table+" where `NAME`='"+RDEscapeString(parser_name)+"'";
q=new RDSqlQuery(sql);
if(!q->first()) {
delete q;