Browse Source

change list sessions stop signal to upcoming new-sm git master. This will break the program for now if you don't compiled nsm from source!

master
Nils 4 years ago
parent
commit
6f4e533bec
  1. 16
      engine/nsmservercontrol.py

16
engine/nsmservercontrol.py

@ -649,12 +649,16 @@ class NsmServerControl(object):
self._queue.append(msg)
continue
#This is what we want:
elif msg.oscpath == "/reply" and msg.params[0] == "/nsm/server/list":
#/reply ['/nsm/server/list', 'test3']
self.internalState["sessions"].add(msg.params[1])
logger.info(f"Received session name: {msg.params[1]}")
elif msg.params[0] == 0 and msg.params[1] == "Done.":
break
elif msg.oscpath == "/reply" and msg.params[0] == "/nsm/server/list":
#/reply ['/nsm/server/list', 'test3'] for a real session or
#/reply ['/nsm/server/list', ''] as "list ended" marker
if msg.params[1]:
self.internalState["sessions"].add(msg.params[1])
logger.info(f"Received session name: {msg.params[1]}")
else: #empty string
break
#elif msg.params[0] == 0 and msg.params[1] == "Done.": # legacy nsmd sent the wrong message. Fixed in new-session-manager june 2020
# break
else:
logger.warning(f"Expected project but got path {msg.oscpath} with {msg.params}. Adding to queue for later.")
self._queue.append(msg)

Loading…
Cancel
Save