Changeset 2134

Show
Ignore:
Timestamp:
05/01/12 17:28:44 (11 years ago)
Author:
jwoithe
Message:

dice: default router setup patch 1/10 from Philippe Carriere: This function forces the creation of a destination whatever is the present existing status. This will be useful (in view of a 'hardware default setting' function) since the same destination is sometimes effectively duplicated in the router space for some devices (Focusrite Saffire Pro 24 and Pro 40, for instance).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/dice/dice_eap.cpp

    r2123 r2134  
    17321732 
    17331733bool 
     1734EAP::RouterConfig::createRoute(unsigned char src, unsigned char dest) { 
     1735    debugOutput(DEBUG_LEVEL_VERBOSE,"RouterConfig::createRoute( 0x%02x, 0x%02x )\n", src, dest); 
     1736    m_routes2.push_back(std::make_pair(dest, src)); 
     1737    return true; 
     1738} 
     1739 
     1740bool 
    17341741EAP::RouterConfig::setupRoute(unsigned char src, unsigned char dest) { 
    17351742    debugOutput(DEBUG_LEVEL_VERBOSE,"RouterConfig::setupRoute( 0x%02x, 0x%02x )\n", src, dest); 
     1743    // modify exisiting routing 
    17361744    for (RouteVectorV2::iterator it=m_routes2.begin(); it!=m_routes2.end(); ++it) { 
    17371745        if (it->first == dest) { 
     
    17401748        } 
    17411749    } 
    1742     m_routes2.push_back(std::make_pair(dest, src)); 
    1743     return false
     1750    // destination does not yet exist; create it 
     1751    return createRoute(src, dest)
    17441752} 
    17451753 
  • trunk/libffado/src/dice/dice_eap.h

    r2096 r2134  
    214214 
    215215        /** 
     216          @brief Create a route between src and dest 
     217 
     218          This will effectively create a new destination. 
     219          If destination exists or its status unknown, 
     220          rather use the next setupRoute function 
     221          */ 
     222        bool createRoute(unsigned char src, unsigned char dest); 
     223 
     224        /** 
    216225          @brief Set up a route between src and dest 
    217226