On Fri, Mar 26, 2010 at 09:10:57AM -0700, Stephen L. Diamond wrote:
> However I am able to backup AND restore tasks successfully with
> barrybackup. That seems to show that writing to the device works, which
> is what you wanted to verify.

Yes.  Thanks.  As your other email concluded, the issue is with Barry.
I believe it is due to using the older commands to retrieve records.


> Address Book: Only 3032 of 3055 records were backed up. It is suspected
> that due to international characters in these records, the BlackBerry
> uses a different low-level protocol, which Barry Backup does not yet
> support. Please contact the developers at http://netdirect.ca/barry if
> you want to assist in debugging this issue.
> 
> Calendar: Only 2402 of 2410 records were backed up. It is suspected that
> due to international characters in these records, the BlackBerry uses a
> different low-level protocol, which Barry Backup does not yet support.
> Please contact the developers at http://netdirect.ca/barry if you want
> to assist in debugging this issue.

Just as an experiment, could you apply the following patch to the latest
git tree, and run the following commands:

        tools/btool -t
        tools/btool -d "Address Book"
        tools/btool -d "Calendar"

If we're lucky, the counts at the bottom of each data dump command should
match the counts in the database table from the first command.

Thanks,
- Chris


diff --git a/src/packet.cc b/src/packet.cc
index ed801af..d0c9337 100644
--- a/src/packet.cc
+++ b/src/packet.cc
@@ -402,12 +402,12 @@ void DBPacket::GetRecords(unsigned int dbId)
        packet.size = htobs(9);
        packet.command = SB_COMMAND_DB_DATA;
        packet.u.db.tableCmd = 
m_con.GetDBCommand(Mode::Desktop::DatabaseAccess);
-       packet.u.db.u.command.operation = SB_DBOP_OLD_GET_RECORDS;
+       packet.u.db.u.command.operation = SB_DBOP_GET_RECORDS;
        packet.u.db.u.command.databaseId = htobs(dbId);
 
        m_send.ReleaseBuffer(9);
 
-       m_last_dbop = SB_DBOP_OLD_GET_RECORDS;
+       m_last_dbop = SB_DBOP_GET_RECORDS;
 }
 
 //
@@ -497,7 +497,7 @@ bool DBPacket::Parse(Parser &parser, const IConverter *ic)
 
        switch( m_last_dbop )
        {
-       case SB_DBOP_OLD_GET_RECORDS:
+       case SB_DBOP_GET_RECORDS:
        case SB_DBOP_GET_RECORD_BY_INDEX:
                parser.Clear();
 
diff --git a/tools/btool.cc b/tools/btool.cc
index d341b7d..e0dd9b5 100644
--- a/tools/btool.cc
+++ b/tools/btool.cc
@@ -210,8 +210,18 @@ struct Store
 class DataDumpParser : public Barry::Parser
 {
        uint32_t m_id;
+       int count;
 
 public:
+       DataDumpParser()
+               : count(0)
+       {
+       }
+       ~DataDumpParser()
+       {
+               cout << "DataDumpParser: " << std::dec << count << " records" 
<< endl;
+       }
+
        virtual void Clear() {}
 
        virtual void SetIds(uint8_t RecType, uint32_t UniqueId)
@@ -227,6 +237,7 @@ public:
                std::cout << "Raw record dump for record: "
                        << std::hex << m_id << std::endl;
                std::cout << data << std::endl;
+               count++;
        }
 
        virtual void Store() {}
@@ -239,21 +250,21 @@ auto_ptr<Parser> GetParser(const string &name, const 
string &filename, bool null
                return auto_ptr<Parser>( new DataDumpParser );
        }
        // check for recognized database names
-       else if( name == Contact::GetDBName() ) {
-               return auto_ptr<Parser>(
-                       new RecordParser<Contact, Store<Contact> > (
-                               new Store<Contact>(filename, false)));
-       }
+//     else if( name == Contact::GetDBName() ) {
+//             return auto_ptr<Parser>(
+//                     new RecordParser<Contact, Store<Contact> > (
+//                             new Store<Contact>(filename, false)));
+//     }
        else if( name == Message::GetDBName() ) {
                return auto_ptr<Parser>(
                        new RecordParser<Message, Store<Message> > (
                                new Store<Message>(filename, false)));
        }
-       else if( name == Calendar::GetDBName() ) {
-               return auto_ptr<Parser>(
-                       new RecordParser<Calendar, Store<Calendar> > (
-                               new Store<Calendar>(filename, false)));
-       }
+//     else if( name == Calendar::GetDBName() ) {
+//             return auto_ptr<Parser>(
+//                     new RecordParser<Calendar, Store<Calendar> > (
+//                             new Store<Calendar>(filename, false)));
+//     }
        else if( name == CallLog::GetDBName() ) {
                return auto_ptr<Parser>(
                        new RecordParser<CallLog, Store<CallLog> > (


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel

Reply via email to