Example #1
0
void BrpProcessEvent(Node* node, Message* msg)
{
    IerpData* ierpData = (IerpData*) IerpGetRoutingProtocol(
                            node,
                            ROUTING_PROTOCOL_IERP);

    BrpData* brpData = (BrpData*) ierpData->brpData;

    // Fuction to process timers
    switch (MESSAGE_GetEvent(msg))
    {
        case MSG_NETWORK_BrpDeleteQueryEntry:
        {
            unsigned int* brpCacheId
                            = (unsigned int*) MESSAGE_ReturnInfo(msg);

            BrpDeleteQueryCoverageEntryByCacheId(brpData, *brpCacheId);

            break;
        }
        default:
        {
            ERROR_Assert(FALSE, "Delete query is the only event now");
        }
    }
}
bool CDtnRequestManager::EventHandler(Message* msg){
    switch (MESSAGE_GetEvent(msg))
    {
    default:
    {
        bool freedByOthers = false;        
        return freedByOthers;
    }    
    }
    return false;
}