Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / ipc.c
index 41949a8..9cf68e8 100644 (file)
@@ -471,10 +471,16 @@ void IPC_Handle(tIPC_Client *Client, size_t MsgLen, tAxWin_IPCMessage *Msg)
 //     _SysDebug("IPC_Handle: (IPCType=%p, Ident=%p, MsgLen=%i, Msg=%p)",
 //             IPCType, Ident, MsgLen, Msg);
        
-       if( MsgLen < sizeof(tAxWin_IPCMessage) )
+       if( MsgLen < sizeof(*Msg) ) {
+               _SysDebug("IPC_Handle: %p Dropped full undersize message (%i < %i)",
+                       Client, MsgLen, sizeof(*Msg));
                return ;
-       if( MsgLen < sizeof(tAxWin_IPCMessage) + Msg->Size )
+       }
+       if( MsgLen < sizeof(*Msg) + Msg->Size ) {
+               _SysDebug("IPC_Handle: %p Dropped undersize message (%i < %i+%i)",
+                       Client, MsgLen, sizeof(*Msg), Msg->Size);
                return ;
+       }
        
        if( Msg->Flags & IPCMSG_FLAG_RENDERER )
        {
@@ -492,7 +498,7 @@ void IPC_Handle(tIPC_Client *Client, size_t MsgLen, tAxWin_IPCMessage *Msg)
                        _SysDebug("WARNING: Message %i has no handler in %s", Msg->ID, renderer->Name);
                        return ;
                }
-               _SysDebug("IPC_Handle: Call %s-%i", renderer->Name, Msg->ID);
+               _SysDebug("IPC_Handle: Call %s-%i %ib", renderer->Name, Msg->ID, Msg->Size);
                rv = renderer->IPCHandlers[Msg->ID](win, Msg->Size, Msg->Data);
                if( rv )
                        _SysDebug("IPC_Handle: rv != 0 (%i)", rv);
@@ -511,7 +517,7 @@ void IPC_Handle(tIPC_Client *Client, size_t MsgLen, tAxWin_IPCMessage *Msg)
                        return ;
                }
        
-               _SysDebug("IPC_Handle: Call WM-%i", Msg->ID);
+               _SysDebug("IPC_Handle: Call WM-%i %ib", Msg->ID, Msg->Size);
                rv = gIPC_MessageHandlers[Msg->ID](Client, Msg);
                if( rv )
                        _SysDebug("IPC_Handle: rv != 0 (%i)", rv);

UCC git Repository :: git.ucc.asn.au