TReKiE / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 0 forks source link

Disconnection problem when several places have the same name #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I am logged with Windows Live Messenger on my computer, the name of the 
place is my computer's name
Now, I log with the same account on the same computer, using MSNPSharp : 
my new place has the same name
So, I can't disconnect the official client using Owner.SignoutFrom(string 
place);
 because the msnpsharp client disconnects itself

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

Original issue reported on code.google.com by adh...@gmail.com on 23 Jan 2009 at 4:11

GoogleCodeExporter commented 9 years ago
Hi,
Fixed.
Could you upgrade your code to:

http://msnp-sharp.googlecode.com/svn/branches/MSNPSHARP_25_STABLE
OR
http://msnp-sharp.googlecode.com/svn/trunk

Thanks for the report.

Note: You can change your EndPoind after logged in:

Owner.EpName = newname

Original comment by hepha...@gmail.com on 23 Jan 2009 at 5:21

GoogleCodeExporter commented 9 years ago
Thank you for the fix !

I saw that I could change the EndPoint name, but my problem is that I can't 
have any 
control on the name the users will use on his official client

In fact, I just don't like to disconnect the places using the names, so I added 
a 
signout method using the Guid :

        /// <summary>
        /// Sign the owner out from the specificed place.
        /// </summary>
        /// <param name="place">The place Id to be signed out</param>
        public void SignoutFrom(Guid placeId)
        {
            if (placeId == NSMessageHandler.MachineGuid)
            {
                Status = PresenceStatus.Offline;
            }
            else if (Places.ContainsValue(placeId))
            {
                NSMessageHandler.MessageProcessor.SendMessage(
                    new NSPayLoadMessage("UUN",
                    new string[] { Mail + ";" + placeId, "4" },
                    "goawyplzthxbye"));
            }
        }

Original comment by adh...@gmail.com on 26 Jan 2009 at 4:20