Skip to content

Commit

Permalink
Fixing a bug that it called loadPolicyFile() with wrong argument, rep…
Browse files Browse the repository at this point in the history
  • Loading branch information
gimite committed Oct 1, 2010
1 parent 74c5d26 commit 8ec2933
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
Binary file modified WebSocketMain.swf
Binary file not shown.
Binary file modified WebSocketMainInsecure.zip
Binary file not shown.
8 changes: 1 addition & 7 deletions flash-src/WebSocketMain.as
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}

Expand All @@ -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 {
Expand Down

0 comments on commit 8ec2933

Please sign in to comment.