From: Michael J. Pounders Date: Thu, 22 Oct 2015 01:32:29 +0000 (-0400) Subject: Add client Key hash to shm_area X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;ds=inline;h=d673b3056e25be57570c42bb4756168c119bd1e4;p=umurmur.git Add client Key hash to shm_area --- diff --git a/src/sharedmemory.c b/src/sharedmemory.c index 67c9fa5..02b27c2 100644 --- a/src/sharedmemory.c +++ b/src/sharedmemory.c @@ -77,6 +77,8 @@ void Sharedmemory_update(void) strncpy( shmptr->client[cc].release, client_itr->release, 120 ); strncpy( shmptr->client[cc].os_version, client_itr->os_version, 120 ); + strncpy( shmptr->client[cc].hash, client_itr->hash, 20 ); + shmptr->client[cc].tcp_port = Util_clientAddressToPortTCP( client_itr ); shmptr->client[cc].udp_port = Util_clientAddressToPortUDP( client_itr ); @@ -99,6 +101,8 @@ void Sharedmemory_update(void) shmptr->client[cc].TCPPingAvg = client_itr->TCPPingAvg; shmptr->client[cc].TCPPingVar = client_itr->TCPPingVar; + + shmptr->client[cc].isAdmin = client_itr->isAdmin; shmptr->client[cc].isSuppressed = client_itr->isSuppressed; diff --git a/src/sharedmemory_struct.h b/src/sharedmemory_struct.h index e696948..5b49848 100644 --- a/src/sharedmemory_struct.h +++ b/src/sharedmemory_struct.h @@ -4,7 +4,6 @@ typedef struct { - char username[121]; char ipaddress[INET6_ADDRSTRLEN]; char channel[121]; @@ -13,12 +12,13 @@ typedef struct bool_t bUDP, authenticated, deaf, mute, self_deaf, self_mute, recording, bOpus; int availableBandwidth; uint32_t online_secs, idle_secs; + uint8_t hash[20]; bool_t isAdmin; bool_t isSuppressed; float UDPPingAvg, UDPPingVar, TCPPingAvg, TCPPingVar; uint32_t UDPPackets, TCPPackets; -} shmclient_t; +}shmclient_t; typedef struct { @@ -29,4 +29,4 @@ typedef struct uint8_t alive; shmclient_t client[]; -} shm_t; +}shm_t;