- Timestamp:
- Jul 16, 2024 8:19:51 AM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/ipc/ipcd/daemon/src/ipcCommandModule.cpp
r103472 r105338 46 46 #include <VBox/log.h> 47 47 48 typedef void FNIPCMMSGHANDLER(PIPCDCLIENT pIpcClient, PCIPCMSG pMsg);48 typedef DECLCALLBACKTYPE(void, FNIPCMMSGHANDLER,(PIPCDCLIENT pIpcClient, PCIPCMSG pMsg)); 49 49 /** Pointer to a IPCM message handler. */ 50 50 typedef FNIPCMMSGHANDLER *PFNIPCMMSGHANDLER; … … 223 223 DECLHIDDEN(void) IPCM_HandleMsg(PIPCDCLIENT pIpcClient, PCIPCMSG pMsg) 224 224 { 225 static const PFNIPCMMSGHANDLERaHandlers[] =226 { 227 ipcmOnPing,228 ipcmOnForward,229 ipcmOnClientHello,230 ipcmOnClientAddName,231 ipcmOnClientDelName,232 ipcmOnClientAddTarget,233 ipcmOnClientDelTarget,234 ipcmOnQueryClientByName225 static const struct CLANG11NONSENSE { PFNIPCMMSGHANDLER pfn; } s_aHandlers[] = 226 { 227 { ipcmOnPing }, 228 { ipcmOnForward }, 229 { ipcmOnClientHello }, 230 { ipcmOnClientAddName }, 231 { ipcmOnClientDelName }, 232 { ipcmOnClientAddTarget }, 233 { ipcmOnClientDelTarget }, 234 { ipcmOnQueryClientByName }, 235 235 }; 236 236 … … 246 246 u32Type &= ~IPCM_MSG_CLASS_REQ; 247 247 u32Type--; 248 if (u32Type >= RT_ELEMENTS( aHandlers))248 if (u32Type >= RT_ELEMENTS(s_aHandlers)) 249 249 { 250 250 Log(("unknown request -- ignoring message\n")); … … 252 252 } 253 253 254 aHandlers[u32Type](pIpcClient, pMsg);255 } 254 s_aHandlers[u32Type].pfn(pIpcClient, pMsg); 255 }
Note:
See TracChangeset
for help on using the changeset viewer.