Usermode/AxWin4 - Fix broken map impl causing pixel->window mapping to fail
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / ipc.cpp
index c507285..1c5ba99 100644 (file)
@@ -65,6 +65,7 @@ void HandleSelect(const fd_set& rfds)
 
 void RegisterClient(CClient& client)
 {
+       _SysDebug("RegisterClient(&client=%p)", &client);
        // allocate a client ID, and save
        for( int i = 0; i < 100; i ++ )
        {
@@ -84,7 +85,14 @@ void RegisterClient(CClient& client)
 CClient* GetClientByID(uint16_t id)
 {
        auto it = glClients.find(id);
-       return (it == glClients.end() ? nullptr : it->second);
+       if(it == glClients.end()) {
+               //_SysDebug("Client %i not registered", id);
+               return nullptr;
+       }
+       else {
+               //_SysDebug("Client %i %i = %p", id, it->first, it->second);
+               return it->second;
+       }
 }
 
 void DeregisterClient(CClient& client)

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