Permalink
Browse files

Fixing a bug that it called loadPolicyFile() with wrong argument, rep…

  • Loading branch information...
gimite committed Oct 1, 2010
1 parent 74c5d26 commit 8ec2933c9ec24be18119f699866b91e4a8c7b2a1
Showing with 1 addition and 7 deletions.
  1. BIN WebSocketMain.swf
  2. BIN WebSocketMainInsecure.zip
  3. +1 −7 flash-src/WebSocketMain.as
View
Binary file not shown.
View
Binary file not shown.
@@ -19,7 +19,6 @@ import bridge.FABridge;
public class WebSocketMain extends Sprite {
- private var policyLoaded:Boolean = false;
private var callerUrl:String;
private var debug:Boolean = false;
@@ -51,7 +50,7 @@ public class WebSocketMain extends Sprite {
url:String, protocol:String,
proxyHost:String = null, proxyPort:int = 0,
headers:String = null):WebSocket {
- loadPolicyFile(null);
+ loadPolicyFile("xmlsocket://" + URLUtil.getServerName(url) + ":843");
return new WebSocket(this, url, protocol, proxyHost, proxyPort, headers);
}
@@ -65,13 +64,8 @@ public class WebSocketMain extends Sprite {
}
public function loadPolicyFile(url:String):void {
- if (policyLoaded && !url) return;
- if (!url) {
- url = "xmlsocket://" + URLUtil.getServerName(this.callerUrl) + ":843";
- }
log("policy file: " + url);
Security.loadPolicyFile(url);
- policyLoaded = true;
}
public function log(message:String):void {

0 comments on commit 8ec2933

Please sign in to comment.