just50415 / android-rcs-ims-stack

Automatically exported from code.google.com/p/android-rcs-ims-stack
0 stars 0 forks source link

Image Share: no empty MSRP message when receiver initiates MSRP connection #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Establish an Image Share session where the image receiver establishes the 
MSRP connection to the sender

What is the expected output? What do you see instead?
As per RFC 4975, section 5.4, the Active endpoint (which initiates the 
connection) must send immediately issue a SEND request. This happens with File 
Transfer, but in Image Share it does not happen.

What version of the product are you using? On what operating system?
RCS-e 2.3.5.

Please provide any additional information below.
Here are the snippets of code from the File Transfer and Image Share modules. 
The obvious difference is the lack of a call to sendEmptyChunk() in the Image 
Share version.

TerminatingFileSharingSession.java:
if (localSetup.equals("passive")) {
  // Passive mode: client wait a connection
  msrpMgr.createMsrpServerSession(remotePath, this);

  // Open the connection
  Thread thread = new Thread(){
    public void run(){
    try {
      // Open the MSRP session                        msrpMgr.openMsrpSession(FileSharingSession.DEFAULT_SO_TIMEOUT);

      // Send an empty packet
       sendEmptyDataChunk();
    } catch (IOException e) {
      if (logger.isActivated()) {
      logger.error("Can't create the MSRP server session", e);
    }
  }   
}

TerminatingImageTransferSession.java:
if (localSetup.equals("passive")) {
  // Passive mode: client wait a connection
  msrpMgr.createMsrpServerSession(remotePath, this);

  // Open the connection
  Thread thread = new Thread(){
    public void run(){
      try {
        // Open the MSRP session
                              msrpMgr.openMsrpSession(ImageTransferSession.DEFAULT_SO_TIMEOUT);
      } catch (IOException e) {
        if (logger.isActivated()) {
          logger.error("Can't create the MSRP server session", e);
        }
      }
    }
  };

Original issue reported on code.google.com by iiaGa...@gmail.com on 20 Jan 2012 at 2:26

GoogleCodeExporter commented 8 years ago
Thks. Corrected in the next release.

Original comment by jmauffret@gmail.com on 22 Jan 2012 at 1:07