Back to index

lightning-sunbird  0.9+nobinonly
Functions
ipcCommandModule.h File Reference
#include "ipcm.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void IPCM_HandleMsg (ipcClient *, const ipcMessage *)

Function Documentation

Definition at line 255 of file ipcCommandModule.cpp.

{
    static ipcCommandModule::MsgHandler handlers[] =
    {
        ipcCommandModule::OnPing,
        ipcCommandModule::OnForward,
        ipcCommandModule::OnClientHello,
        ipcCommandModule::OnClientAddName,
        ipcCommandModule::OnClientDelName,
        ipcCommandModule::OnClientAddTarget,
        ipcCommandModule::OnClientDelTarget,
        ipcCommandModule::OnQueryClientByName
    };

    int type = IPCM_GetType(rawMsg);
    LOG(("IPCM_HandleMsg [type=%x]\n", type));

    if (!(type & IPCM_MSG_CLASS_REQ)) {
        LOG(("not a request -- ignoring message\n"));
        return;
    }

    type &= ~IPCM_MSG_CLASS_REQ;
    type--;
    if (type < 0 || type >= (int) (sizeof(handlers)/sizeof(handlers[0]))) {
        LOG(("unknown request -- ignoring message\n")); 
        return;
    }

    (handlers[type])(client, rawMsg);
}

Here is the call graph for this function:

Here is the caller graph for this function: