Ignore:
Timestamp:
16/02/2010 23:07:11 (2 years ago)
Author:
chris
Message:

Convert attributes to host byte order when reporting errors.

Convert timestamps to host byte order before dividing from usecs to secs,
store in uint64_t variables to avoid truncation, and display in host byte
order.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/backupclient/BackupClientFileAttributes.cpp

    r2611 r2614  
    251251        { \ 
    252252                BOX_TRACE("Attribute Compare: " << message << " differ: " \ 
    253                         "local " << a1->attribute << ", " \ 
    254                         "remote " << a2->attribute); \ 
     253                        "local "  << ntoh(a1->attribute) << ", " \ 
     254                        "remote " << ntoh(a2->attribute)); \ 
    255255                return false; \ 
    256256        } 
     
    263263        if(!IgnoreModTime) 
    264264        { 
    265                 int t1 = a1->ModificationTime / 1000000; 
    266                 int t2 = a2->ModificationTime / 1000000; 
     265                uint64_t t1 = box_ntoh64(a1->ModificationTime) / 1000000; 
     266                uint64_t t2 = box_ntoh64(a2->ModificationTime) / 1000000; 
    267267                if(t1 != t2) 
    268268                { 
     
    276276        if(!IgnoreAttrModTime) 
    277277        { 
    278                 int t1 = a1->AttrModificationTime / 1000000; 
    279                 int t2 = a2->AttrModificationTime / 1000000; 
     278                uint64_t t1 = box_ntoh64(a1->AttrModificationTime) / 1000000; 
     279                uint64_t t2 = box_ntoh64(a2->AttrModificationTime) / 1000000; 
    280280                if(t1 != t2) 
    281281                { 
     
    300300                        BOX_TRACE("Attribute Compare: Symbolic link target " 
    301301                                "or extended attributes differ: " 
    302                                 "local " << PrintEscapedBinaryData(s1) << ", " 
     302                                "local "  << PrintEscapedBinaryData(s1) << ", " 
    303303                                "remote " << PrintEscapedBinaryData(s2)); 
    304304                        return false; 
Note: See TracChangeset for help on using the changeset viewer.