diff --git a/src/eitd/SIevents.cpp b/src/eitd/SIevents.cpp index fa1a07180..87b3f4870 100644 --- a/src/eitd/SIevents.cpp +++ b/src/eitd/SIevents.cpp @@ -265,7 +265,7 @@ int SIevent::saveXML(FILE *file, const char *serviceName) const int SIevent::saveXML0(FILE *file) const { - if(fprintf(file, "\t\t\n", eventID)<0) + if(fprintf(file, "\t\t\n", eventID, table_id)<0) return 1; return 0; } diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index d3bb0a420..0660fb3a4 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -254,8 +254,6 @@ void *insertEventsfromFile(void * data) t_original_network_id onid = 0; t_transport_stream_id tsid = 0; t_service_id sid = 0; - char cclass[20]; - char cuser[20]; std::string indexname; std::string filename; std::string epgname; @@ -296,6 +294,9 @@ void *insertEventsfromFile(void * data) while (event) { SIevent e(onid,tsid,sid,xmlGetNumericAttribute(event, "id", 16)); + uint8_t tid = xmlGetNumericAttribute(event, "tid", 16); + if(tid) + e.table_id = tid; node = event->xmlChildrenNode; @@ -328,15 +329,13 @@ void *insertEventsfromFile(void * data) node = node->xmlNextNode; } - int count = 0; while (xmlGetNextOccurence(node, "content") != NULL) { - cclass[count] = xmlGetNumericAttribute(node, "class", 16); - cuser[count] = xmlGetNumericAttribute(node, "user", 16); + char cl = xmlGetNumericAttribute(node, "class", 16); + e.contentClassification += cl; + cl = xmlGetNumericAttribute(node, "user", 16); + e.userClassification += cl; node = node->xmlNextNode; - count++; } - e.contentClassification = std::string(cclass, count); - e.userClassification = std::string(cuser, count); while (xmlGetNextOccurence(node, "component") != NULL) { SIcomponent c;