Comment #1 on issue 138 by [email protected]: SGW multilink support for same linkset
http://code.google.com/p/jss7/issues/detail?id=138

After this changes, we can see same packet put in queue, to avoid this you must apply these changes: (see topic: SGW dahdi multi link )

add a synchronized in org.mobicents.protocols.ss7.mtp.Mtp3 (line 362),
and a clone of buffer.


    private static Object padlock = new Object();


               synchronized (padlock)
                 {
byte[] messageBuffer = fetchBuffer(rxFrame.len-5); //-5 = FSN(1) + BSN(1) + LEN(1) +2xCRC(1) System.arraycopy(rxFrame.frame, 3, messageBuffer, 0, rxFrame.len-5);

                     if (logger.isDebugEnabled()) {
logger.debug("SCCP messageBuffer:"+HexTools.dump( messageBuffer,0));
                     }

                     //messageBuffer[0] = (byte) sio;
                     try {

                      byte[] clone = new byte[messageBuffer.length];
System.arraycopy(messageBuffer,0,clone,0,messageBuffer.length);

                      mtp3Listener.receive(clone);
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
                 }

Ludovic Monnier



Reply via email to