Show
Ignore:
Timestamp:
08/24/07 08:09:49 (17 years ago)
Author:
ppalmers
Message:

- Sort the FFADODevice vector on GUID before assigning device id's

This results in the same device id for identical device setups,
independent of the way they are connected or the node numbers they
have been assigned.

- Sanitized debug message reporting a bit
- Cosmetic changes

Files:

Legend:

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

    r478 r560  
    122122{ 
    123123    return m_guid == rhs.m_guid; 
     124} 
     125 
     126bool 
     127ConfigRom::compareGUID( const ConfigRom& a, const ConfigRom& b ) { 
     128    return a.getGuid() > b.getGuid(); 
    124129} 
    125130 
  • trunk/libffado/src/libieee1394/configrom.h

    r478 r560  
    8080    bool updatedNodeId(); 
    8181    bool setNodeId( fb_nodeid_t nodeId ); 
     82     
     83    /** 
     84     * @brief Compares the GUID of two ConfigRom's 
     85     * 
     86     * This function compares the GUID of two ConfigRom objects and returns true 
     87     * if the GUID of @ref a is larger than the GUID of @ref b . This is intended 
     88     * to be used with the STL sort() algorithm. 
     89     *  
     90     * Note that GUID's are converted to integers for this. 
     91     *  
     92     * @param a pointer to first ConfigRom 
     93     * @param b pointer to second ConfigRom 
     94     *  
     95     * @returns true if the GUID of @ref a is larger than the GUID of @ref b . 
     96     */ 
     97    static bool compareGUID(  const ConfigRom& a, const ConfigRom& b ); 
    8298 
    8399    void printConfigRom() const; 
  • trunk/libffado/src/libieee1394/ieee1394service.cpp

    r445 r560  
    3838#include <iomanip> 
    3939 
    40 IMPL_DEBUG_MODULE( Ieee1394Service, Ieee1394Service, DEBUG_LEVEL_VERBOSE ); 
     40IMPL_DEBUG_MODULE( Ieee1394Service, Ieee1394Service, DEBUG_LEVEL_NORMAL ); 
    4141 
    4242Ieee1394Service::Ieee1394Service() 
     
    831831Ieee1394Service::setVerboseLevel(int l) 
    832832{ 
     833    debugOutput( DEBUG_LEVEL_VERBOSE, "Setting verbose level to %d...\n", l ); 
    833834    setDebugLevel(l); 
    834835}