foobarlab / UpStage-Video-Hack

UpStage Streaming Hack
http://www.foobarlab.net/
GNU General Public License v2.0
5 stars 1 forks source link

Fixed port numbers (SWF_PORT, POLICY_PORT, WEB_PORT) #59

Open foobarlab opened 11 years ago

foobarlab commented 11 years ago

An instance has these preset 'standard' ports:

swf_port = 7230
web_port = 8081
policy_port = 3000

It is not possible to start an instance on other ports without breaking loading a stage.

Obviously these ports are read from multiple different configurations and those interfere:

client: Transport.as, Client.as: use Client.POLICY_PORT instead of evaluating the given url parameters

server: pages.py: variable vars uses the Config.POLICY_PORT and Config.SWF_PORT instead of the given port numbers by the starting command

It is rather expected that not configuration is involved but just the commandline arguments specifying these ports. A configuration could only be used for setting default values in case no commandline argument is given.

foobarlab commented 11 years ago

Apparently the static variables on the server python code in config.py get overwritten, so this kind of behaviour remains a smell.

Transport.as and Client.as have been fixed in commit ddb59a50a054fdc103ea5a9d9cd8dfa50a3e86b1.