oifayulian / sipme-media-server

Automatically exported from code.google.com/p/sipme-media-server
0 stars 1 forks source link

[JSR309 Driver] Request identifier overflow. #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. Bugs exist in 
org.mobicents.javax.media.mscontrol.mediagroup.MediaGroupImpl#nextRequestID
2. Constructor of jain.protocol.ip.mgcp.message.parms.RequestIdentifier is 
expecting unsigned hexadecimal string.
3. Exception thrown when 
org.mobicents.javax.media.mscontrol.MediaSessionImpl#getUniqueReqID reaches 
80000000, 
 java.lang.IllegalArgumentException: Request identifier must contain between 1 and 32 hexadecimal digits!

Code to quick test:
    public static void main(String args[]){
        int reqId = 0;
        while(true){
            try {
                new RequestIdentifier(Integer.toString(++reqId));
            } catch (IllegalArgumentException ex){
                ex.printStackTrace();
                break;
            }
        }
    }

What is the expected output? What do you see instead?
org.mobicents.javax.media.mscontrol.mediagroup.MediaGroupImpl#nextRequestID 
should not throw exception when integer overflow. 

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by waileong...@gmail.com on 28 May 2014 at 1:39

Attachments: