Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandoislas committed May 19, 2017
2 parents 58a1d5d + 2d41f1f commit 142b861
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/data/config_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class ConfigServer:
input_delay = None
quality = None
fps = None
stream_video = None

def __init__(self):
pass
Expand All @@ -25,6 +26,7 @@ def load(cls):
"5/10/15 low - 75 lan - 100 loopback")
cls.fps = cls.config.get_int("VIDEO", "fps", 1, 60, 30, "FPS of video stream. No limit if set to 60\n"
"10 low - 30 lan - 60 loopback")
cls.stream_video = cls.config.get_boolean("VIDEO", "stream", True, "Stream video to clients")
# General
cls.scan_timeout = cls.config.get_int("GENERAL", "scan_timeout", 0, 60 * 5, 60 * 2, "Sets the time they server "
"is allowed to scan for the"
Expand Down
2 changes: 2 additions & 0 deletions src/server/net/wii/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def close(self):
pass

def update(self, packet):
if not ConfigServer.stream_audio:
return
LoggerBackend.verbose("Received audio packet")
h = audio.header.parse(packet)

Expand Down
2 changes: 2 additions & 0 deletions src/server/net/wii/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def h264_nal_encapsulate(self, is_idr, vstrm):
return nals

def update(self, packet, test=False):
if not ConfigServer.stream_video:
return
LoggerBackend.verbose("Received video packet")
h = video.header.parse(packet)
is_idr = self.packet_is_idr(packet)
Expand Down
3 changes: 3 additions & 0 deletions src/server/util/wpa_supplicant.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ def get_psk_thread(self, code):
self.psk_thread_cli.expect("<3>WPS-CRED-RECEIVED", timeout=60)
# save conf
LoggerWpa.debug("PSK obtained")
# Save to temp config before reading from it
self.psk_thread_cli.sendline("save_config")
self.psk_thread_cli.expect("OK", timeout=5)
self.save_connect_conf(bssid)
self.set_status(self.DISCONNECTED)
return
Expand Down

0 comments on commit 142b861

Please sign in to comment.