[svn] commit: r769 - /branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Feb 9 10:29:52 UTC 2010


Author: mgraff
Date: Tue Feb  9 10:29:52 2010
New Revision: 769

Log:
checkpoint; still has some sort of bug that seems to be related to automatic conversion from char * to string

Modified:
    branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc

Modified: branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc
==============================================================================
--- branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc (original)
+++ branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc Tue Feb  9 10:29:52 2010
@@ -101,14 +101,13 @@
     while (rc == SQLITE_ROW) {
         rows++;
 
-        const unsigned char *type = sqlite3_column_text(q_record, 0);
+        const char *type = (const char *)sqlite3_column_text(q_record, 0);
         int ttl = sqlite3_column_int(q_record, 1);
-        const unsigned char *sigtype = sqlite3_column_text(q_record, 2);
-        const unsigned char *rdata = sqlite3_column_text(q_record, 3);
+        const char *sigtype = (const char *)sqlite3_column_text(q_record, 2);
+        const char *rdata = (const char *)sqlite3_column_text(q_record, 3);
 
         if (sigtype == NULL) {
-            RdataPtr item = createRdata(RRType((const char *)type),
-                RRClass("IN"), (const char *)rdata);
+            RdataPtr item = createRdata(RRType(type), RRClass("IN"), rdata);
             rrset->addRdata(item);
             if (target_ttl == -1 || target_ttl > ttl) {
                 target_ttl = ttl;
@@ -126,6 +125,8 @@
         rrset->setTTL(RRTTL(target_ttl));
         target.push_back(rrset);
     }
+
+    cout << "RETURNED " << rows << " ROWS" << endl;
 
     return (rows);
 }




More information about the bind10-changes mailing list