Skip to content

Commit

Permalink
modules.websocket: added attributes to iDentity message in smartvisu …
Browse files Browse the repository at this point in the history
…payload protocol
  • Loading branch information
msinn committed Jul 1, 2024
1 parent 8c414ae commit fd77b41
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion modules/websocket/smartvisu.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

class Protocol():

version = '1.0.4'
version = '1.0.5'

protocol_id = 'sv'
protocol_name = 'smartvisu'
Expand Down Expand Up @@ -295,6 +295,12 @@ async def smartVISU_protocol_v4(self, websocket):
self.sv_clients[client_addr]['hostname'] = data.get('hostname', '')
self.sv_clients[client_addr]['browser'] = data.get('browser', '')
self.sv_clients[client_addr]['bver'] = data.get('bver', '')

self.sv_clients[client_addr]['os_name'] = data.get('os_name', '')
self.sv_clients[client_addr]['os_vers'] = data.get('os_vers', '')
self.sv_clients[client_addr]['os_vname'] = data.get('os_vname', '')
self.sv_clients[client_addr]['pl_type'] = data.get('pl_type', '')
self.sv_clients[client_addr]['pl_vendor'] = data.get('pl_vendor', '')
self.logger.info(f"Client {self.build_client_info(client_addr)} identified as {self.build_sw_info(client_addr)}")
answer = {}

Expand Down Expand Up @@ -1046,6 +1052,11 @@ def get_visu_client_info(self):
infos['browser'] = self.sv_clients[client_addr].get('browser', '')
infos['browserversion'] = self.sv_clients[client_addr].get('bver', '')

infos['os_name'] = self.sv_clients[client_addr].get('os_name', '')
infos['os_vers'] = self.sv_clients[client_addr].get('os_vers', '')
infos['os_vname'] = self.sv_clients[client_addr].get('os_vname', '')
infos['pl_type'] = self.sv_clients[client_addr].get('pl_type', '')
infos['pl_vendor'] = self.sv_clients[client_addr].get('pl_vendor', '')
client_list.append(infos)

return client_list
Expand Down

0 comments on commit fd77b41

Please sign in to comment.