[Red5commits] [1523] send "NetConnection?.Connect.Rejected" for non-existing scopes to match what FCS

jbauch luke at codegent.com
Wed Jan 24 10:32:21 EST 2007


send "NetConnection?.Connect.Rejected" for non-existing scopes to match what FCS/FMS does


Timestamp: 11/07/06 11:54:28 EST (3 months ago) 
Change: 1523 
Author: jbauch

Files (see diff or trac for details): 
doc/trunk/changelog.txt
java/server/trunk/src/org/red5/server/net/rtmp/RTMPHandler.java


Trac: http://mirror1.cvsdude.com/trac/osflash/red5/changeset/1523

Index: /java/server/trunk/src/org/red5/server/net/rtmp/RTMPHandler.java
===================================================================
--- /java/server/trunk/src/org/red5/server/net/rtmp/RTMPHandler.java (revision 1519)
+++ /java/server/trunk/src/org/red5/server/net/rtmp/RTMPHandler.java (revision 1523)
@@ -367,10 +367,11 @@
 							call.setStatus(Call.STATUS_SERVICE_NOT_FOUND);
 							if (call instanceof IPendingServiceCall) {
-								((IPendingServiceCall) call)
-										.setResult(getStatus(NC_CONNECT_FAILED));
+								StatusObject status = (StatusObject) getStatus(NC_CONNECT_REJECTED);
+								status.setDesciption("No scope \""+path+"\" on this server.");
+								((IPendingServiceCall) call).setResult(status);
 							}
 							log.info("No global scope found for " + path
 									+ " on " + host);
-							conn.close();
+							disconnectOnReturn = true;
 						} else {
 							final IContext context = global.getContext();
@@ -381,6 +382,7 @@
 								call.setStatus(Call.STATUS_SERVICE_NOT_FOUND);
 								if (call instanceof IPendingServiceCall) {
-									((IPendingServiceCall) call)
-											.setResult(getStatus(NC_CONNECT_FAILED));
+									StatusObject status = (StatusObject) getStatus(NC_CONNECT_REJECTED);
+									status.setDesciption("No scope \""+path+"\" on this server.");
+									((IPendingServiceCall) call).setResult(status);
 								}
 								log.info("Scope " + path + " not found on "
Index: /doc/trunk/changelog.txt
===================================================================
--- /doc/trunk/changelog.txt (revision 1522)
+++ /doc/trunk/changelog.txt (revision 1523)
@@ -12,4 +12,6 @@
 Bugfixes:
 - serialize RecordSet objects (Trac #201)
+- "NetConnection.Connect.Rejected" is sent for non-existing scopes to
+  match result code of FCS/FMS
 
 


Note:
Diffs are chopped if more than 25k.
This is to get past the limit on the mailing list.



More information about the Red5commits mailing list