SOURCES: myth_datadirect-dn_r10247.diff (NEW), myth_dn-eit_r10247....

luzik luzik at pld-linux.org
Tue Sep 5 13:06:12 CEST 2006


Author: luzik                        Date: Tue Sep  5 11:06:11 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
SC patches for mythtv

---- Files affected:
SOURCES:
   myth_datadirect-dn_r10247.diff (NONE -> 1.1)  (NEW), myth_dn-eit_r10247.diff (NONE -> 1.1)  (NEW), myth_eit-bev-dn_r10247.diff (NONE -> 1.1)  (NEW), myth_eit-cache_r10247.diff (NONE -> 1.1)  (NEW), myth_eit-fasthuff_r10247.diff (NONE -> 1.1)  (NEW), myth_eit-ratelimit_r10247.diff (NONE -> 1.1)  (NEW), myth_legacy-switch_r10247.diff (NONE -> 1.1)  (NEW), myth_patpmt_r10247.diff (NONE -> 1.1)  (NEW), myth_sasc-base_r10247.diff (NONE -> 1.1)  (NEW), myth_softcsa_r10247.diff (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/myth_datadirect-dn_r10247.diff
diff -u /dev/null SOURCES/myth_datadirect-dn_r10247.diff:1.1
--- /dev/null	Tue Sep  5 13:06:11 2006
+++ SOURCES/myth_datadirect-dn_r10247.diff	Tue Sep  5 13:06:06 2006
@@ -0,0 +1,171 @@
+=== programs/mythfilldatabase/filldata.cpp
+Index: programs/mythfilldatabase/filldata.cpp
+===================================================================
+--- programs/mythfilldatabase/filldata.cpp.orig	2006-06-20 17:32:57.000000000 -0400
++++ programs/mythfilldatabase/filldata.cpp	2006-06-20 17:36:06.000000000 -0400
+@@ -60,7 +60,8 @@
+ bool dddataretrieved = false;
+ bool mark_repeats = true;
+ bool channel_updates = false;
+-
++bool add_missing_channels = false;
++bool ignore_on_air = false;
+ int maxDays = 0;
+ int listing_wrap_offset = 0;
+ 
+@@ -263,8 +264,12 @@
+ void clearDataBySource(int sourceid, QDateTime from, QDateTime to) 
+ {
+     MSqlQuery query(MSqlQuery::InitCon());
+-    query.prepare("SELECT chanid FROM channel WHERE "
+-                  "sourceid = :SOURCE ;");
++    QString queryStr = QString(
++                  "SELECT chanid FROM channel WHERE "
++                  "sourceid = :SOURCE");
++    if (ignore_on_air)
++        queryStr += QString(" AND useonairguide <> 1");
++    query.prepare(queryStr);
+     query.bindValue(":SOURCE", sourceid);
+ 
+     if (!query.exec())
+@@ -795,6 +800,17 @@
+ 
+     ddprocessor.updateStationViewTable();
+ 
++    if (ignore_on_air)
++    {
++        // Remove xmltvid from all channels with 'useonairguide' set
++        MSqlQuery remove_id(MSqlQuery::DDCon());
++        remove_id.prepare(
++            "UPDATE channel SET xmltvid=NULL WHERE useonairguide = 1 "
++            "AND sourceid = :SOURCEID");
++        remove_id.bindValue(":SOURCEID", source.id);
++        if (!remove_id.exec())
++            MythContext::DBError("Removing xmltvid", remove_id);
++    }
+     // Find all the channels in the dd_v_station temp table
+     // where there is no channel with the same xmltvid in the
+     // DB using the same source.
+@@ -840,9 +856,13 @@
+             }
+ 
+             // First check if channel already in DB, but without xmltvid
+-            query.prepare("SELECT chanid FROM channel "
++            QString queryStr = QString(
++                          "SELECT chanid FROM channel "
+                           "WHERE sourceid = :SOURCEID AND "
+                           "      (channum=:CHANNUM OR atscsrcid=:ATSCSRCID)");
++            if (ignore_on_air)
++                queryStr += QString(" AND useonairguide <> 1");
++            query.prepare(queryStr);
+             query.bindValue(":SOURCEID",  source.id);
+             query.bindValue(":CHANNUM",   channum);
+             query.bindValue(":ATSCSRCID", atscsrcid);
+@@ -862,7 +882,7 @@
+                     "UPDATE channel "
+                     "SET xmltvid = :XMLTVID "
+                     "WHERE chanid = :CHANID AND sourceid = :SOURCEID");
+-
++                
+                 while (query.next())
+                 {
+                     uint chanid = query.value(0).toInt();
+@@ -879,36 +899,39 @@
+                 continue; // go on to next channel without xmltv
+             }
+ 
+-            // The channel doesn't exist in the DB, insert it...
+-            int mplexid = -1, majorC, minorC, chanid = 0;
+-            long long freq;
+-            get_atsc_stuff(channum, source.id, freqid,
+-                           majorC, minorC, freq);
+-
+-            if (minorC > 0 && freq >= 0)
++            if (add_missing_channels)
+             {
+-                mplexid = ChannelUtil::CreateMultiplex(
+-                    source.id, "atsc", freq, "8vsb");
+-            }
+-
+-            if ((mplexid > 0) || (minorC == 0))
+-                chanid = ChannelUtil::CreateChanID(source.id, channum);
+-
+-            if (chanid > 0)
+-            {
+-                QString icon   = "";
+-                int  serviceid = 0;
+-                bool oag       = false; // use on air guide
+-                bool hidden    = false;
+-                bool hidden_in_guide = false;
+-
+-                ChannelUtil::CreateChannel(
+-                    mplexid,   source.id, chanid, 
+-                    callsign,  name,      channum,
+-                    serviceid, majorC,    minorC,
+-                    oag,       hidden,    hidden_in_guide,
+-                    freqid,    icon,      tvformat,
+-                    xmltvid);
++                // The channel doesn't exist in the DB, insert it...
++                int mplexid = -1, majorC, minorC, chanid = 0;
++                long long freq;
++                get_atsc_stuff(channum, source.id, freqid,
++                               majorC, minorC, freq);
++    
++                if (minorC > 0 && freq >= 0)
++                {
++                    mplexid = ChannelUtil::CreateMultiplex(
++                        source.id, "atsc", freq, "8vsb");
++                }
++    
++                if ((mplexid > 0) || (minorC == 0))
++                    chanid = ChannelUtil::CreateChanID(source.id, channum);
++    
++                if (chanid > 0)
++                {
++                    QString icon   = "";
++                    int  serviceid = 0;
++                    bool oag       = false; // use on air guide
++                    bool hidden    = false;
++                    bool hidden_in_guide = false;
++    
++                    ChannelUtil::CreateChannel(
++                        mplexid,   source.id, chanid, 
++                        callsign,  name,      channum,
++                        serviceid, majorC,    minorC,
++                        oag,       hidden,    hidden_in_guide,
++                        freqid,    icon,      tvformat,
++                        xmltvid);
++                }
+             }
+         }
+     }
+@@ -3441,6 +3464,14 @@
+         {
+             channel_updates = true;
+         }
++        else if (!strcmp(a.argv()[argpos], "--add_missing_channels"))
++        {
++            add_missing_channels = true;
++        }
++        else if (!strcmp(a.argv()[argpos], "--ignore_eit_channels"))
++        {
++            ignore_on_air = true;
++        }
+         else if (!strcmp(a.argv()[argpos], "--graboptions"))
+         {
+             if (((argpos + 1) >= a.argc()))
+@@ -3646,6 +3677,14 @@
+             cout << "   override custom channel names, which is why it is\n";
+             cout << "   off by default.\n";
+             cout << "\n";
++            cout << "--add_missing_channels\n";
++            cout << "   Insert any channels that are found but not in\n";
++            cout << "   the database.  This is off by default, as it can\n";
++            cout << "   cause issues with DVB channels.\n";
++            cout << "\n";
++            cout << "--ignore_eit_channels\n";
++            cout << "   Don't get data for any channels that are marked\n";                 cout << "   As using the on-air guid.\n";
++            cout << "\n";
+             cout << "--graboptions <\"options\">\n";
+             cout << "   Pass options to grabber\n";
+             cout << "\n";

================================================================
Index: SOURCES/myth_dn-eit_r10247.diff
diff -u /dev/null SOURCES/myth_dn-eit_r10247.diff:1.1
--- /dev/null	Tue Sep  5 13:06:12 2006
+++ SOURCES/myth_dn-eit_r10247.diff	Tue Sep  5 13:06:06 2006
@@ -0,0 +1,135 @@
+Index: libs/libmythtv/mpeg/mpegdescriptors.cpp
+===================================================================
+--- libs/libmythtv/mpeg/mpegdescriptors.cpp.orig	2006-06-20 17:31:10.000000000 -0400
++++ libs/libmythtv/mpeg/mpegdescriptors.cpp	2006-06-20 17:36:06.000000000 -0400
+@@ -223,8 +223,12 @@
+             return QString("Audio");
+         case DescriptorID::caption_service:
+             return QString("Caption Service");
+-        case DescriptorID:: content_advisory:
++        case DescriptorID::content_advisory:
+             return QString("Content Advisory");
++        case DescriptorID::dish_ename:
++            return QString("Dishnet EIT Name");
++        case DescriptorID::dish_edescription:
++            return QString("Dishnet EIT Description");
+         case DescriptorID::extended_channel_name:
+             return QString("Extended Channel Name");
+         case DescriptorID::service_location:
+Index: libs/libmythtv/mpeg/mpegdescriptors.h
+===================================================================
+--- libs/libmythtv/mpeg/mpegdescriptors.h.orig	2006-06-20 17:31:10.000000000 -0400
++++ libs/libmythtv/mpeg/mpegdescriptors.h	2006-06-20 17:36:06.000000000 -0400
+@@ -115,6 +115,11 @@
+         audio_stream                = 0x81,
+         caption_service             = 0x86,
+         content_advisory            = 0x87,
++
++        // Dish Network
++        dish_ename                  = 0x91,
++        dish_edescription           = 0x92,
++
+         extended_channel_name       = 0xA0,
+         service_location            = 0xA1,
+         atsc_time_shifted_service   = 0xA2,
+Index: libs/libmythtv/siparser.cpp
+===================================================================
+--- libs/libmythtv/siparser.cpp.orig	2006-06-20 17:31:10.000000000 -0400
++++ libs/libmythtv/siparser.cpp	2006-06-20 17:37:24.000000000 -0400
+@@ -570,6 +570,9 @@
+             break;
+         case 0x42: /* Service Table(s) */
+         case 0x46:  
++            VERBOSE(VB_SIPARSER, LOC + QString("Calling ParseSDT (%1 / %2)")
++                                   .arg(head.table_id, 0, 16).arg(pid, 0, 16));
++
+             ParseSDT(pid, &head, &buffer[8], size-8);
+             break;
+ #ifdef USING_DVB_EIT
+@@ -577,6 +580,14 @@
+             /* Standard Now/Next Event Information Table(s) */
+         case 0x50 ... 0x6F:
+             /* Standard Future Event Information Table(s) */
++            VERBOSE(VB_SIPARSER, LOC + QString("Calling ParseDVBEIT (%1/%2)")
++                                   .arg(head.table_id, 0, 16).arg(pid, 0, 16));
++            ParseDVBEIT(pid, &head, &buffer[8], size-8);
++            break;
++        case 0x80 ... 0xFE:
++            /* Dishnet uses this range for longterm(7-9days) EIT */
++            VERBOSE(VB_SIPARSER, LOC + QString("Calling ParseDVBEIT DN(%1/%2)")
++                                   .arg(head.table_id, 0, 16).arg(pid, 0, 16));
+             ParseDVBEIT(pid, &head, &buffer[8], size-8);
+             break;
+ #endif
+@@ -1180,6 +1191,9 @@
+     uint16_t network_id = buffer[0] << 8 | buffer[1];
+     // TODO: Handle Network Specifics here if they aren't set
+ 
++    //TODO : Make this configurable.
++    PrivateTypes.ForceGuidePresent = true;
++
+     if (PrivateTypesLoaded == false)
+         LoadPrivateTypes(network_id);
+ 
+@@ -1266,6 +1280,13 @@
+             Table[EVENTS]->RequestEmit(s.ServiceID);
+             eit_requested = true;
+         }
++ 
++        //TODO: This should be tied into the above ?
++        if ((PrivateTypes.ForceGuidePresent) && (!eit_requested))
++        {
++            Table[EVENTS]->RequestEmit(s.ServiceID);
++            eit_requested = true;
++        }
+ #endif
+ 
+         VERBOSE(VB_SIPARSER, LOC +
+@@ -1292,6 +1313,10 @@
+     Table[EVENTS]->DependencyMet(SERVICES);
+     //Table[EVENTS]->AddPid(0x12,0x00,0x00,true); // see ticket #755
+     Table[EVENTS]->AddPid(0x12,0x7F,0x80,0x12); // see ticket #755
++
++    // This should only be added based on the user enabling 7-9day dishnet
++    // EIT events
++    Table[EVENTS]->AddPid(0x300,0x00,0x00,true);
+ }
+ 
+ /** \fn SIParser::GetLanguagePriority(const QString&)
+@@ -1967,6 +1992,7 @@
+ {
+     uint    descriptorTag    = data[0];
+     uint    descriptorLength = data[1];
++    int tnum;
+ 
+     switch (descriptorTag)
+     {
+@@ -2022,6 +2048,28 @@
+             ProcessContentDescriptor(data, descriptorLength + 2, event);
+             break;
+ 
++        case DescriptorID::dish_ename:
++            if (event.TableID > 0x80)
++                tnum = 2;
++            else
++                tnum = 1;
++
++            Huffman2ToQString((uint8_t *)data+3, data[1]-1, tnum, event.Event_Name);
++            break;
++
++        case DescriptorID::dish_edescription:
++            if (event.TableID > 0x80)
++                tnum = 2;
++            else
++                tnum = 1;
++
++            if ((data[3]&0xf8) == 0x80)
++                Huffman2ToQString((uint8_t *)data+4, data[1]-2, tnum, event.Description);
++            else
++                Huffman2ToQString((uint8_t *)data+3, data[1]-1, tnum, event.Description);
++            //VERBOSE(VB_EIT, LOC + QString("Descr : %1").arg(event.Description));
++            break;
++
+         default:
+             ProcessUnusedDescriptor(pid, data, descriptorLength + 2);
+             break;

================================================================
Index: SOURCES/myth_eit-bev-dn_r10247.diff
diff -u /dev/null SOURCES/myth_eit-bev-dn_r10247.diff:1.1
--- /dev/null	Tue Sep  5 13:06:12 2006
+++ SOURCES/myth_eit-bev-dn_r10247.diff	Tue Sep  5 13:06:06 2006
@@ -0,0 +1,320 @@
+Index: libs/libmythtv/siparser.cpp
+===================================================================
+--- libs/libmythtv/siparser.cpp.orig	2006-01-21 08:09:02.000000000 -0800
++++ libs/libmythtv/siparser.cpp	2006-01-21 08:09:09.000000000 -0800
+@@ -297,6 +297,21 @@
+                     VERBOSE(VB_SIPARSER, LOC + "Forcing Guide Present");
+                 }
+             }
++            if (QString(query.value(0).toString()) == "guide_on_single_tid")
++            {
++                if (query.value(1).toString() == "yes")
++                {
++                    PrivateTypes.GuideOnSingleTransport = true;
++                    VERBOSE(VB_SIPARSER, LOC + "Guide is on single transport");
++                }
++            }
++            if (QString(query.value(0).toString()) == "extended_guide_tid")
++            {
++                PrivateTypes.ExtendedGuideOnTransport = query.value(1).toInt();
++                VERBOSE(VB_SIPARSER, LOC +
++                        QString("Dish Network Extended Guide Present on Transport %1")
++                        .arg(PrivateTypes.ExtendedGuideOnTransport));
++            }
+             if (QString(query.value(0).toString()) == "guide_fixup")
+             {
+                 PrivateTypes.EITFixUp = query.value(1).toInt();
+@@ -590,10 +605,17 @@
+ #ifdef USING_DVB_EIT
+         case 0x4E ... 0x4F:
+             /* Standard Now/Next Event Information Table(s) */
+-        case 0x50 ... 0xFF:
+-            /* Standard Future Event Information Table(s) */
+             ParseDVBEIT(pid, &head, buffer, size);
+             break;
++        case 0x50 ... 0x6F:
++            /* Standard Future Event Information Table(s) */
++            ParseDVBEIT(pid, &head, buffer, size); 
++            break;
++        case 0x70 ... 0xFF:
++            /* Extended Event Information Table */
++            if (PrivateTypes.ForceExtendedGuidePresent)
++                ParseDVBEIT(pid, &head, buffer, size);
++            break;
+ #endif
+         default:
+             VERBOSE(VB_SIPARSER, LOC + 
+@@ -1195,17 +1217,26 @@
+ 
+     int CurrentTransport = 0;
+ 
+-    bool get_epg=false;
++    PrivateTypes.ForceExtendedGuidePresent = false;
++
+     uint16_t network_id = buffer[0] << 8 | buffer[1];
+     // TODO: Handle Network Specifics here if they aren't set
+ 
+-    PrivateTypes.ForceGuidePresent = true;
+-    PrivateTypes.GuideTransportID = 229;
+-    PrivateTypes.GuideOnSingleTransport = true;
+-
+     if (PrivateTypesLoaded == false)
+         LoadPrivateTypes(network_id);
+ 
++    if (PrivateTypes.GuideOnSingleTransport)
++        PrivateTypes.GuideTransportID = PrivateTypes.CurrentTransportID;
++
++    if (PrivateTypes.CurrentTransportID == PrivateTypes.ExtendedGuideOnTransport)
++    {
++        PrivateTypes.ForceExtendedGuidePresent = true;
++
++        VERBOSE(VB_SIPARSER, LOC +
++            QString("SDT: Extended guide present on this TID: %1")
++            .arg(head->table_id_ext));
++    }
++
+     if (PrivateTypes.SDTMapping)
+     {
+         if (PrivateTypes.CurrentTransportID == head->table_id_ext)
+@@ -1218,8 +1249,8 @@
+     }
+ 
+     VERBOSE(VB_SIPARSER, LOC +
+-            QString("SDT: This TID: %1 is %2the CurrentTransport")
+-                  .arg(head->table_id_ext).arg(CurrentTransport ? "" : "not "));
++            QString("SDT: This TID: %1 (nid=%2) is %3the CurrentTransport")
++                  .arg(head->table_id_ext).arg(network_id).arg(CurrentTransport ? "" : "not "));
+     ProcessUnusedDescriptor(pid, (uint8_t *)head, sizeof(tablehead_t));
+     ProcessUnusedDescriptor(pid, (uint8_t *)buffer, size);
+ 
+@@ -1227,8 +1258,6 @@
+     {
+         if (Table[SERVICES]->AddSection(head,0,0))
+             return;
+-        if(head->table_id_ext == PrivateTypes.GuideTransportID)
+-            get_epg=true;
+     }
+     else
+     {
+@@ -1321,9 +1350,18 @@
+ 
+     // TODO: This is temp
+     Table[EVENTS]->DependencyMet(SERVICES);
+-    //Table[EVENTS]->AddPid(0x12,0x00,0x00,true); // see ticket #755
+-//    Table[EVENTS]->AddPid(0x12,0x7F,0x80,0x12); // see ticket #755
+-    Table[EVENTS]->AddPid(0x300,0x00,0x00,true); // Dish 9-day
++
++    // TODO: Handle BEV extended guide
++    if (PrivateTypes.ForceExtendedGuidePresent)
++    {
++        Table[EVENTS]->AddPid(0x300,0x00,0x00,true); // Dish 9-day
++    }
++    else
++    {
++        // Handle everything else..
++        Table[EVENTS]->AddPid(0x12,0x00,0x00,true); // see ticket #755
++        Table[EVENTS]->AddPid(0x12,0x7F,0x80,0x12); // see ticket #755
++    }
+ }
+ 
+ // CRC32 lookup table for polynomial 0x04c11db7
+Index: libs/libmythtv/sitypes.h
+===================================================================
+--- libs/libmythtv/sitypes.h.orig	2006-01-21 08:08:49.000000000 -0800
++++ libs/libmythtv/sitypes.h	2006-01-21 08:09:09.000000000 -0800
+@@ -121,6 +121,8 @@
+     bool          CustomGuidePID;
+     uint16_t      GuidePID;
+     bool          GuideOnSingleTransport;
++    bool          ForceExtendedGuidePresent;
++    uint16_t      ExtendedGuideOnTransport;
+     uint16_t      GuideTransportID;
+     /* List of ServiceID:s for which to parse out subtitle from the description.
+        Used in EITFixUpStyle4() */
+Index: libs/libmythtv/dbcheck.cpp
+===================================================================
+--- libs/libmythtv/dbcheck.cpp.orig	2006-01-21 08:05:23.000000000 -0800
++++ libs/libmythtv/dbcheck.cpp	2006-01-21 08:09:09.000000000 -0800
+@@ -12,11 +12,18 @@
+ /// This is the DB schema version expected by the running MythTV instance.
+ const QString currentDatabaseVersion = "1122";
+ 
++/// This is the DB schema minor version used by supplementary patches
++const QString currentDatabaseVersionMinor = "1";
++
+ static bool UpdateDBVersionNumber(const QString &newnumber);
++static bool UpdateDBVersionMinor( const QString &newminor);
+ static bool performActualUpdate(const QString updates[], QString version,
+                                 QString &dbver);
++static bool performMinorUpdate(const QString updates[], QString minor,
++                                QString &dbminor);
+ static bool InitializeDatabase(void);
+ static bool doUpgradeTVDatabaseSchema(void);
++static bool dbMinorUpdate(void);
+ 
+ /** \defgroup db_schema MythTV Database Schema
+ 
+@@ -353,6 +360,48 @@
+     return true;
+ }
+ 
++static bool UpdateDBVersionMinor(const QString &newminor)
++{
++    // delete old schema version
++    MSqlQuery query(MSqlQuery::InitCon());
++
++    QString thequery = "DELETE FROM settings WHERE value='DBSchemaVerMinor';";
++    query.prepare(thequery);
++    query.exec();
++
++    if (query.lastError().type() != QSqlError::None)
++    {
++        QString msg =
++            QString("DB Error (Deleting old DB minor version number): \n"
++                    "Query was: %1 \nError was: %2 \nnew version: %3")
++            .arg(thequery)
++            .arg(MythContext::DBErrorMessage(query.lastError()))
++            .arg(newminor);
++        VERBOSE(VB_IMPORTANT, msg);
++        return false;
++    }
++
++    // set new schema minor
++    thequery = QString("INSERT INTO settings (value, data, hostname) "
++                       "VALUES ('DBSchemaVerMinor', %1, NULL);").arg(newminor);
++    query.prepare(thequery);
++    query.exec();
++
++    if (query.lastError().type() != QSqlError::None)
++    {
++        QString msg =
++            QString("DB Error (Setting new DB minor version number): \n"
++                    "Query was: %1 \nError was: %2 \nnew minor version: %3")
++            .arg(thequery)
++            .arg(MythContext::DBErrorMessage(query.lastError()))
++            .arg(newminor);
++        VERBOSE(VB_IMPORTANT, msg);
++        return false;
++    }
++
++    return true;
++}
++
+ /** \fn performActualUpdate(const QString[], QString, QString&)
+  *  \brief Runs a number of SQL commands, and updates the schema version.
+  *
+@@ -400,6 +449,44 @@
+     return true;
+ }
+ 
++static bool performMinorUpdate(const QString updates[], QString minor,
++                                QString &dbminor)
++{
++    MSqlQuery query(MSqlQuery::InitCon());
++
++    VERBOSE(VB_IMPORTANT, QString("Upgrading to schema minor ") + minor);
++
++    int counter = 0;
++    QString thequery = updates[counter];
++
++    while (thequery != "")
++    {
++        query.prepare(thequery);
++        query.exec();
++
++        if (query.lastError().type() != QSqlError::None)
++        {
++            QString msg =
++                QString("DB Error (Performing database upgrade): \n"
++                        "Query was: %1 \nError was: %2 \nnew minor: %3")
++                .arg(thequery)
++                .arg(MythContext::DBErrorMessage(query.lastError()))
++                .arg(minor);
++            VERBOSE(VB_IMPORTANT, msg);
++            return false;
++        }
++
++        counter++;
++        thequery = updates[counter];
++    }
++
++    if (!UpdateDBVersionMinor(minor))
++        return false;
++
++    dbminor = minor;
++    return true;
++}
++
+ /** \fn UpgradeTVDatabaseSchema(void)
+  *  \brief This is the function called from outside dbcheck.cpp to update the schema.
+  *
+@@ -416,14 +503,18 @@
+ bool UpgradeTVDatabaseSchema(void)
+ {
+     QString dbver = gContext->GetSetting("DBSchemaVer");
++    QString dbminor = gContext->GetSetting("DBSchemaVerMinor");
+ 
+-    VERBOSE(VB_IMPORTANT, QString("Current Schema Version: %1").arg(dbver));
++    VERBOSE(VB_IMPORTANT, QString("Current Schema Version: %1.%2").arg(dbver)
++                                                                  .arg(dbminor));
+ 
+-    if (dbver == currentDatabaseVersion)
++    if ((dbver == currentDatabaseVersion) &&
++        (dbminor == currentDatabaseVersionMinor))
+         return true;
+ 
+-    VERBOSE(VB_IMPORTANT, QString("Newest Schema Version : %1")
+-                                  .arg(currentDatabaseVersion));
++    VERBOSE(VB_IMPORTANT, QString("Newest Schema Version : %1.%2")
++                                  .arg(currentDatabaseVersion)
++                                  .arg(currentDatabaseVersionMinor));
+ 
+     MSqlQuery lockquery(MSqlQuery::InitCon());
+ 
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list