Changeset 683

Show
Ignore:
Timestamp:
11/02/07 02:46:31 (15 years ago)
Author:
ppalmers
Message:

- fix bug introduced in r673

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libieee1394/configrom.cpp

    r673 r683  
    230230    int nb_retries = 5; 
    231231 
    232     while ( !csr_info->service->read( csr_info->nodeId, 
    233                                    addr, 
    234                                    (size_t)length/4, 
    235                                    ( quadlet_t* )buffer) && nb_retries-- ) 
     232    while ( nb_retries--  
     233            && !csr_info->service->read( csr_info->nodeId, 
     234                                         addr, 
     235                                         (size_t)length/4, 
     236                                         ( quadlet_t* )buffer)  ) 
    236237    {// failed, retry 
    237238    } 
    238239 
    239     if (nb_retries) return 0; // success 
     240    if (nb_retries > -1) return 0; // success 
    240241    else return -1; // failure 
    241242} 
     
    403404    return result; 
    404405} 
    405  
     406  
    406407const Glib::ustring 
    407408ConfigRom::getModelName() const 
     
    518519{ 
    519520    using namespace std; 
    520     printf( "Config ROM\n" ); 
    521     printf( "\tCurrent Node Id:\t%d\n",       getNodeId() ); 
    522     printf( "\tGUID:\t\t\t0x%016llX\n",       getGuid()); 
    523     printf( "\tVendor Name:\t\t%s\n",         getVendorName().c_str() ); 
    524     printf( "\tModel Name:\t\t%s\n",          getModelName().c_str() ); 
    525     printf( "\tNode Vendor ID:\t\t0x%06x\n",  getNodeVendorId() ); 
    526     printf( "\tModel Id:\t\t0x%08x\n",        getModelId() ); 
    527     printf( "\tUnit Specifier ID:\t0x%06x\n",  getUnitSpecifierId() ); 
    528     printf( "\tUnit version:\t\t0x%08x\n",        getUnitVersion() ); 
    529     printf( "\tISO resource manager:\t%d\n",  isIsoResourseManager() ); 
    530     printf( "\tCycle master capable:\t%d\n",  isSupportsIsoOperations() ); 
    531     printf( "\tBus manager capable:\t%d\n",   isBusManagerCapable() ); 
    532     printf( "\tCycle clock accuracy:\t%d\n", getCycleClockAccurancy() ); 
    533     printf( "\tMax rec:\t\t%d (max asy payload: %d bytes)\n", 
     521    debugOutput(DEBUG_LEVEL_NORMAL, "Config ROM\n" ); 
     522    debugOutput(DEBUG_LEVEL_NORMAL, "\tCurrent Node Id:\t%d\n",       getNodeId() ); 
     523    debugOutput(DEBUG_LEVEL_NORMAL, "\tGUID:\t\t\t0x%016llX\n",       getGuid()); 
     524    debugOutput(DEBUG_LEVEL_NORMAL, "\tVendor Name:\t\t%s\n",         getVendorName().c_str() ); 
     525    debugOutput(DEBUG_LEVEL_NORMAL, "\tModel Name:\t\t%s\n",          getModelName().c_str() ); 
     526    debugOutput(DEBUG_LEVEL_NORMAL, "\tNode Vendor ID:\t\t0x%06x\n",  getNodeVendorId() ); 
     527    debugOutput(DEBUG_LEVEL_NORMAL, "\tModel Id:\t\t0x%08x\n",        getModelId() ); 
     528    debugOutput(DEBUG_LEVEL_NORMAL, "\tUnit Specifier ID:\t0x%06x\n",  getUnitSpecifierId() ); 
     529    debugOutput(DEBUG_LEVEL_NORMAL, "\tUnit version:\t\t0x%08x\n",        getUnitVersion() ); 
     530    debugOutput(DEBUG_LEVEL_NORMAL, "\tISO resource manager:\t%d\n",  isIsoResourseManager() ); 
     531    debugOutput(DEBUG_LEVEL_NORMAL, "\tCycle master capable:\t%d\n",  isSupportsIsoOperations() ); 
     532    debugOutput(DEBUG_LEVEL_NORMAL, "\tBus manager capable:\t%d\n",   isBusManagerCapable() ); 
     533    debugOutput(DEBUG_LEVEL_NORMAL, "\tCycle clock accuracy:\t%d\n", getCycleClockAccurancy() ); 
     534    debugOutput(DEBUG_LEVEL_NORMAL, "\tMax rec:\t\t%d (max asy payload: %d bytes)\n", 
    534535            getMaxRec(), getAsyMaxPayload() ); 
    535536}