[Red5] RTMPClient FMS3 patch

Prabhu Tamilarasan (omNovia) ptamilarasan at omnovia.com
Tue Oct 21 15:32:58 PDT 2008


This patch is for the RTMPClient.  There is a casting exception when
connecting to an FMS server.   Underlying reason is that in
BaseRTMPClientHandler.onInvoke() line 545 the clientid is being cast as an
integer.  On FMS3 the clientIDs are strings (DKAYqOot).

 

The clientid is only used in that function to compare against null in which
case it reads the streamid from source.  Patch is to declare clientID as an
Object which works with both integer clientids and string clientids.  Can
someone verify this does not break anything?

 

 

[root at DEV rtmp]# svn diff

Index: BaseRTMPClientHandler.java

===================================================================

--- BaseRTMPClientHandler.java  (revision 3260)

+++ BaseRTMPClientHandler.java  (working copy)

@@ -542,7 +542,7 @@

                if (onStatus) {

                        // XXX better to serialize ObjectMap to Status
object

                        ObjectMap<?, ?> objMap = (ObjectMap<?, ?>)
call.getArguments()[0];

-                       Integer clientId = (Integer) objMap.get("clientid");

+                       Object clientId = (Object) objMap.get("clientid");

                        if (clientId == null) {

                                clientId = source.getStreamId();

                        }

 

 

 

Thanks,

 

 

 

  _____  


 

 http://www.omnovia.com/images/mailicon.gif
next generation web conferencing


Prabhu Tamilarasan 
Senior Software Engineer

675 Bering Drive, Suite 290
Houston, TX 77057 USA
www.omnovia.com


ptamilarasan at omnovia.com 

T +1.281.500.4065 x 731 

  _____  

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20081021/3080df2e/attachment.html 


More information about the Red5 mailing list