Menu

I think I have found a BUG :(

Help
PsyMonkey
2007-01-23
2013-04-29
  • PsyMonkey

    PsyMonkey - 2007-01-23

    Hi,

    If you attach a object to the switchboard the following happens.  If the switchboard is initiated by the msn client (Not my 3rd party version but the real thing) everything works fine, msg is sent and received by both of them.  If the switchboard is initiated by JML with a attachment to the switchboard, no message will reach the receiving end.  I have notice when this happens the switchboard has no contacts attached to it.

    Just want to say thanks for the great lib, it is saving me loads of effort.

    Thanks,
    Phil

     
    • PsyMonkey

      PsyMonkey - 2007-01-23

      I think i found the problem.  In BasicMessenger.java, the 'public void sendText(final Email email, final String text)' function looks like this.

              final Object attachment = new Object();
              addSwitchboardListener(new MsnSwitchboardAdapter() {

                  public void switchboardStarted(MsnSwitchboard switchboard) {
      *                if (switchboard.getAttachment() == attachment) {
                          switchboard.inviteContact(email);
                      }
                  }

                  public void contactJoinSwitchboard(MsnSwitchboard switchboard,
                          MsnContact contact) {
      *                if (switchboard.getAttachment() == attachment
      *                        && email.equals(contact.getEmail())) {
      *                    switchboard.setAttachment(null);
                          removeSwitchboardListener(this);
                          switchboard.sendText(text);
                      }
                  }

              });
              newSwitchboard(attachment);

      The 3 stars i think is the problem.  If the switchboard has a attachment the invite will not be sent to the contact.  The same if the contact joins the switchboard the attachment will be set to null!!!  Dont really know why this is needed the cheack : switchboard.getAttachment() == attachment.

      Hope this helps.
      Phil

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.