On the SIP-Communicator project (http://sip-communicator.org/) we are now implementing the msn protocol
and using java-jml. But I've encountered some problems.
I've made some tests with the last SVN version and I found these problems.
1. IncomingREM - Does not detect when user is removed from a group
2. IncomingREM - when removing buddy a NullPointerException is thrown.
java.lang.NullPointerException
at net.sf.jml.protocol.incoming.IncomingREM.getId(IncomingREM.java:65)
at net.sf.jml.protocol.incoming.IncomingREM.messageReceived(IncomingREM.java:92)
As there is no email in the incoming REM message only the id of the contact is there. The incoming message is :
REM 8 FL dcf1cb9e-c941-42ee-a0cb-39f887e64df7
3. When incoming IncomingADG is received the getting of parameters groupID and groupName are not correct
4. The same as 3 but for incoming packet IncomingREG
Correct me if I am wrong. I will fixed them locally. Should I post the fixes ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you fix these issues, please please post the fixes! I started working on the remove functionality and got pulled away to other things and haven't had time to finish it yet. =/ It's actually one of the biggest issues right now and if you end up fixing it and sending something my way, I'll aim to put out a new release ASAP!
Yes list our project in your web site. Here are the chnages which I made. I've tested them but if there are some problems - any suggestions are welcome :))
1. IncomingADG
public String getGroupName() {
if (protocol.before(MsnProtocol.MSNP10)) {
return StringUtils.urlDecode(getParam(1));
}
return StringUtils.urlDecode(getParam(0));
}
public String getGroupId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return StringUtils.urlDecode(getParam(2));
}
return getParam(1);
}
2.IncomingREG
public String getGroupId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return getParam(1);
}
return getParam(0);
}
public String getGroupName() {
if (protocol.before(MsnProtocol.MSNP10)) {
return StringUtils.urlDecode(getParam(2));
}
return StringUtils.urlDecode(getParam(1));
}
3.IncomingREM
public Email getEmail() {
if (protocol.before(MsnProtocol.MSNP10)) {
return Email.parseStr(getParam(2));
}
if(getList() == MsnList.AL)
return Email.parseStr(getParam(1));
else
return null;
}
public String getId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return getEmail().getEmailAddress();
}
return getParam(1);
}
And in method messageReceived(MsnSession session)
Replaced the following :
MsnContactImpl contact = (MsnContactImpl) contactList
.getContactById(getId());
In #1, you have:
public String getGroupId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return StringUtils.urlDecode(getParam(2));
}
return getParam(1);
}
Is there any reason why the first one is a urlDecode instead of just a getParam(2)? Like was that on purpose? =)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi again.
there was some problem in the code you comitted.
Must be :
IncomingREG
public String getGroupId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return getParam(1);
}
return getParam(0);
}
but in the svn repository its
47 public String getGroupId() {
48 if (protocol.before(MsnProtocol.MSNP10)) {
49 return getParam(0);
50 }
51 else {
52 return getParam(1);
53 }
54
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
On the SIP-Communicator project (http://sip-communicator.org/) we are now implementing the msn protocol
and using java-jml. But I've encountered some problems.
I've made some tests with the last SVN version and I found these problems.
1. IncomingREM - Does not detect when user is removed from a group
2. IncomingREM - when removing buddy a NullPointerException is thrown.
java.lang.NullPointerException
at net.sf.jml.protocol.incoming.IncomingREM.getId(IncomingREM.java:65)
at net.sf.jml.protocol.incoming.IncomingREM.messageReceived(IncomingREM.java:92)
As there is no email in the incoming REM message only the id of the contact is there. The incoming message is :
REM 8 FL dcf1cb9e-c941-42ee-a0cb-39f887e64df7
3. When incoming IncomingADG is received the getting of parameters groupID and groupName are not correct
4. The same as 3 but for incoming packet IncomingREG
Correct me if I am wrong. I will fixed them locally. Should I post the fixes ?
Hi again.
Obviously these problems are for versions of MSN protocol greater then/and version 10.
If you fix these issues, please please post the fixes! I started working on the remove functionality and got pulled away to other things and haven't had time to finish it yet. =/ It's actually one of the biggest issues right now and if you end up fixing it and sending something my way, I'll aim to put out a new release ASAP!
BTW! Would you like to have your project listed on http://java-jml.sf.net/?
Yes list our project in your web site. Here are the chnages which I made. I've tested them but if there are some problems - any suggestions are welcome :))
1. IncomingADG
public String getGroupName() {
if (protocol.before(MsnProtocol.MSNP10)) {
return StringUtils.urlDecode(getParam(1));
}
return StringUtils.urlDecode(getParam(0));
}
public String getGroupId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return StringUtils.urlDecode(getParam(2));
}
return getParam(1);
}
2.IncomingREG
public String getGroupId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return getParam(1);
}
return getParam(0);
}
public String getGroupName() {
if (protocol.before(MsnProtocol.MSNP10)) {
return StringUtils.urlDecode(getParam(2));
}
return StringUtils.urlDecode(getParam(1));
}
3.IncomingREM
public Email getEmail() {
if (protocol.before(MsnProtocol.MSNP10)) {
return Email.parseStr(getParam(2));
}
if(getList() == MsnList.AL)
return Email.parseStr(getParam(1));
else
return null;
}
public String getId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return getEmail().getEmailAddress();
}
return getParam(1);
}
And in method messageReceived(MsnSession session)
Replaced the following :
MsnContactImpl contact = (MsnContactImpl) contactList
.getContactById(getId());
with
MsnContactImpl contact = null;
if(list == MsnList.AL)
contact = (MsnContactImpl)
contactList.getContactByEmail(getEmail());
else
contact = (MsnContactImpl) contactList.getContactById(getId());
I think thats it.
Hey! One question:
In #1, you have:
public String getGroupId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return StringUtils.urlDecode(getParam(2));
}
return getParam(1);
}
Is there any reason why the first one is a urlDecode instead of just a getParam(2)? Like was that on purpose? =)
No copy paste mistake, must be just getParam :)) sorry
No problem! And thanks for the fixes! =) I committed them about 2 hours ago. =D
Hi again.
there was some problem in the code you comitted.
Must be :
IncomingREG
public String getGroupId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return getParam(1);
}
return getParam(0);
}
but in the svn repository its
47 public String getGroupId() {
48 if (protocol.before(MsnProtocol.MSNP10)) {
49 return getParam(0);
50 }
51 else {
52 return getParam(1);
53 }
54
Ack! Thanks! Submitted fix. =)
One more fix :))
in IncomingRMG
public String getGroupId() {
if (protocol.before(MsnProtocol.MSNP10)) {
return getParam(1);
}
return getParam(0);
}
Thanks! SVN update pending. =)