Index: trunk/BNC/bnctabledlg.cpp
===================================================================
--- trunk/BNC/bnctabledlg.cpp	(revision 1469)
+++ trunk/BNC/bnctabledlg.cpp	(revision 1470)
@@ -218,10 +218,15 @@
   QStringList lines;
   QStringListIterator it(_allLines);
+  int endSourceTable = 1;
   while (it.hasNext()) {
     QString line = it.next();
+    if ((endSourceTable == 1 ) && line.indexOf("ENDSOURCETABLE") == 0) { 
+      endSourceTable = 0;
+    }
     if (line.indexOf("STR") == 0) {
       lines.push_back(line);
     }
   }
+  if (endSourceTable == 1) { printf("ENDSOURCETABLE missing\n");}
 
   static const QStringList labels = QString("mountpoint,identifier,format,"
@@ -236,5 +241,5 @@
     QStringList hlp = lines[0].split(";");
     _table->setColumnCount(hlp.size()-1);
-    _table->setRowCount(lines.size());
+    _table->setRowCount(lines.size() - endSourceTable);
 
     QListIterator<QString> it(lines);
@@ -422,4 +427,5 @@
   QByteArray outData;
   query.waitForRequestResult(url, outData);
+  int endSourceTable = 1;
   if (query.status() == bncNetQuery::finished) {
     QTextStream in(outData);
@@ -427,4 +433,7 @@
     while ( !line.isNull() ) {
       line = in.readLine();
+      if ((endSourceTable == 1 ) && line.indexOf("ENDSOURCETABLE") == 0) { 
+        endSourceTable = 0;
+      }
       if (line.indexOf("CAS") == 0) {
         lines.append(line);
@@ -432,4 +441,5 @@
     }
   }
+  if (endSourceTable == 1) { printf("ENDSOURCETABLE missing\n");}
   if (lines.size() > 0) {
     _casterTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
@@ -438,5 +448,5 @@
     QStringList hlp = lines[0].split(";");
     _casterTable->setColumnCount(hlp.size()-1);
-    _casterTable->setRowCount(lines.size());
+    _casterTable->setRowCount(lines.size() - endSourceTable);
 
     QListIterator<QString> it(lines);
