Coder Social home page Coder Social logo

msnp-sharp's People

Contributors

androidmeda avatar

Watchers

 avatar

Forkers

prashant-jonny

msnp-sharp's Issues

Multiple custom emoticons do not transmit properly

What steps will reproduce the problem?
1. Send a message containing more than one custom emoticon (using 
SendEmoticonDefinitions) from MSNPSharp.

What is the expected output? What do you see instead?
The expected output is multiple custom emoticons visible in the remote 
client (Live Messenger). Instead, at most one is visible, and sometimes 
none are visible.

What version of the product are you using? On what operating system?
Rev 461, Windows XP Pro.


Please provide any additional information below.
I traced through this a bit and couldn't see an issue with the 
SendEmoticonDefinitions code path, so I'm assuming it must be a problem in 
the P2P invitation request / send mechanism. The good news is usually one 
emoticon shows up. On a related note, I tried out the "Emoticon Test" 
button, and it doesn't seem to work (not sure if it was completed?). It  
causes a little white square placeholder to appear, but not the emoticon.

Also, after trying to send multiple custom emoticons, the remote client 
(Live Messenger) sends an ANS command to MSNPSharp every 60 seconds which 
opens a session and causes SBMessageHandler.ProcessInvitations to get 
called (there's no invitations to process though). Thirty seconds later, 
the session times out, and another thirty seconds later, the process starts 
over again.


Original issue reported on code.google.com by [email protected] on 3 Nov 2008 at 11:45

Typo in Resources.resx (Unix-only)

There is a small typo that impacts building on Mono due to BSD/Unix case
sensitivity:

In MSNPSharp/Resources/Resources.resx:

  <data name="owner" type="System.Resources.ResXFileRef, System.Windows.Forms">

    <value>..\resources\owner.png;System.Drawing.Bitmap, System.Drawing,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

  </data>


The "resources" folder should be "Resources", lest a compile error crops
up.   Changing this one typo allows the .SLN to compile w/o any issues on
Monodevelop.

Original issue reported on code.google.com by [email protected] on 11 Aug 2008 at 2:51

Test program won't sign in

Attempted to compile with VS2005 

Exception thrown on line 468 (  socket = GetPreparedSocket();)
"{"The specified value is not valid.\r\nParameter name: optionValue"}"

Original issue reported on code.google.com by [email protected] on 20 Mar 2007 at 6:44

ContactJoined event is not fired.

What steps will reproduce the problem?
1. BOT has about 30 active conversation.(Maybe not talking, but session was
created.)
2. Send a message to a contact WITHOUT a conversation session yet.
3. Create a conversation, invite the contact, then save the message in a
memory queue(like the MSNP sample)

What is the expected output? What do you see instead?
The ContactJoined event is not fired properly.
However, when the contact sends a message to the bot, the ContactJoined 
event is then fired and all queued message were sent.

What version of the product are you using? On what operating system?
MSNP 2.0.5 with Windows Vista.

Please provide any additional information below.
If I use a MSN account with only a few contacts, the events are fired 
accordingly. The problem only occurs when there are many contacts with 
active conversation sessions.

Original issue reported on code.google.com by [email protected] on 3 Nov 2008 at 9:32

Messenger 8.5 Conflict

What steps will reproduce the problem?
1. Have a contact on the list with WLM 8.5 Beta
2. Sign in with that contact
3. Crashes bot.

What is the expected output? What do you see instead?
Expected: Normal login
See: An exception thrown, don't have the details on my at the moment

What version of the product are you using? On what operating system?
2007-05-27, XP

Please provide any additional information below.
This always occurs if one of the contacts on the list uses WLM 8.5...


Original issue reported on code.google.com by [email protected] on 2 Jun 2007 at 7:49

The bug about messenger.Connected is still exist.

I have submitted a bug about messenger.connected.
I get latest source from svn server.
But the bug is still exist.

I sign in a account with DotnetMSNClient. 
Then I sign in the account with Microsoft MSN client.
The status panel of DotnetMSNClient show "singed off ....",but I find the
messenger.Connected is still "true".

Please check again.


Original issue reported on code.google.com by [email protected] on 21 Jul 2008 at 2:50

Potential bug in MSNSLPMessage.FromMail

I think there's a problem with this property.

public string FromMail { 
   get { 
      return To.Replace("<msnmsgr:", "").Replace(">", ""); 
   } 
} 

Notice it says "To.Replace", shouldn't it be "From.Replace" ?

Original issue reported on code.google.com by [email protected] on 24 Nov 2008 at 9:52

System.NotImplementedException on latest Mono/Linux

I have a software which uses MSNPSharp. It works on Winddows but doesn't on
Mono/Linux. I had 1.9, so I tried to update it to the latest SVN version
but it still doesn't work.
I took your latest MSNPSharp version (2.05).

Mono version is :
# mono --version
Mono JIT compiler version 2.1 (/trunk/mono r111973)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none


Thank you for your work, this library is great !


The exception stack trace is :

Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.NotImplementedException: The requested feature is not implemented.
  at System.Net.ServicePointManager.set_ServerCertificateValidationCallback
(System.Net.Security.RemoteCertificateValidationCallback value) [0x00000]
  at MSNPSharp.ContactService..ctor () [0x00000]
  at MSNPSharp.ContactService..ctor (MSNPSharp.NSMessageHandler nsHandler)
[0x00000]
  at MSNPSharp.NSMessageHandler..ctor () [0x00000]
  at (wrapper managed-to-native)
System.Reflection.MonoCMethod:InternalInvoke
(object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
  at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters)
[0x00000]
  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic)
[0x00000]
  at MSNPSharp.Core.Factory.CreateNameserverHandler () [0x00000]
  at MSNPSharp.Messenger..ctor () [0x00000]
  at InstantMsg.IMCMsn.Connect () [0x00000]
  at InstantMsg.IMCMsn..ctor () [0x00000]
  at InstantMsg.InstantMsgCore..ctor () [0x00000]
  at InstantMsg.Program.Main (System.String[] args) [0x00000]

Original issue reported on code.google.com by [email protected] on 30 Aug 2008 at 7:25

TASK: Remove ContactInfo, MembershipContactInfo

1) Classes to remove:
ContactInfo, MembershipContactInfo

2) Update Contact class: 
GetHashCode() { mail.GetHashCode() - type.GetHashCode }
Remove ContactIdentifier. Contact.GetHashCode() =
ContactIdentifier.GetHashCode()

3) Remove MembershipContacts from XMLContactList
Add SerializableDictionary<Service, SerializableDictionary<MemberRole,
SerializableDictionary<int, BaseMember>>> a = new
SerializableDictionary<Service, SerializableDictionary<MemberRole,
SerializableDictionary<int, BaseMember>>>();

SerializableDictionary<int, BaseMember> = is Contact.HashCode, BaseMember

Original issue reported on code.google.com by [email protected] on 27 Aug 2008 at 12:15

All P2P transfers trigger a P2PTransferSession.TransferAborted event

What steps will reproduce the problem?
1. Cause a P2P transfer to be created. I did this by sending a custom 
emoticon to MSNPSharp.
2. After the transfer has successfully completed (a few seconds), disconnect 
MSNPSharp from the server.

What is the expected output? What do you see instead?
The expected output is to not see any P2PTransferSession.TransferAborted 
events being fired. Instead, every P2P transfer that has occurred while 
connected will trigger a TransferAborted event.

What version of the product are you using? On what operating system?
Rev 456 (trunk), Windows XP Pro.

Please provide any additional information below.
When MSNPSharp disconnects, P2PMessageSession.AbortAllTransfers() is invoked 
to clean-up any outstanding transfers. However, sessions are never actually 
removed from the hashtable, resulting in the problem.

In MSNPSharp.DataTransfer.P2PMessageSession.RemoveTransferSession(), change 

transferSessions.Remove(session);

to

transferSessions.Remove(session.SessionId);

Additionally, MSNPSharp.DataTransfer.P2PMessageSession.AbortAllTransfers 
needs to be refactored because it can't enumerate the collection at the same 
time that it is calling session.AbortTransfer, because that causes the 
iterated collection to be modifed.


Original issue reported on code.google.com by [email protected] on 1 Nov 2008 at 3:36

all contacts are offline when I singin

I have downed load the new msnpsharp source code.
When I clear my project and then rebuild the project some thing was 
happen. When I singin the msn with this program but my all contacts are 
offline even if they are online. I wish you understand my poor english, 
thanks. 


Original issue reported on code.google.com by [email protected] on 28 Jul 2008 at 5:16

Implement Framework Design Guidelines

The msnp-sharp library looks extensive, but it seems a bit awkward to work
with when things like classes aren't named as they should be.

Implementing the changes would introduce a lot of breaking changes, but I
think it would make the library better in the long-term.

The guidelines are available here:
http://msdn.microsoft.com/en-us/library/ms229042.aspx

...or just run FxCop against the code.

Original issue reported on code.google.com by [email protected] on 2 Nov 2008 at 1:35

the color translator bug at line 310 in MSNPSharp.TextMessage

the code of line 310 in MSNPSharp.TextMessage is 'if (color.Length >= 6)'.

when msnpsharp server recive a text message like this:
{MSG 0 N 149 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8
X-MMS-IM-Format: FN=Arial; EF=B; CO=8000; CS=86; PF=22}

the color parameter is '8000', and it indicates Green.but the color
parameter length is 4,so the color will always be black.


Original issue reported on code.google.com by [email protected] on 4 Sep 2008 at 12:26

Reflection error in Mono

What steps will reproduce the problem?
1. Download Mono
2. Run the MSNPSharp sample on Mono
3. Attempt log in

What is the expected output? What do you see instead?

I would expect to log in, but I receive an exception intead. It 
says "InvalidOperationException: There was an error reflecting 
field 'RequestSecurityToken'.".

Full progran log (with stack trace) attached

Original issue reported on code.google.com by [email protected] on 17 Nov 2008 at 7:06

Attachments:

String can't be used as contact.

What steps will reproduce the problem?
1. Invite a contact to a conversation using a mail as a string.

What is the expected output? What do you see instead?
It should be able to use the email as a contact. It gives an error instead.

What version of the product are you using? On what operating system?
Visual C# 2008 Express, Vista Ultimate

Please provide any additional information below.
Works perfectly with DotMSN 2.02.

Original issue reported on code.google.com by [email protected] on 31 Aug 2008 at 8:36

How do we save the display picture?

Hello

The Messenger object has an attribute, Messenger.Owner.DisplayImage, that 
is the last display picture set using an MSN client for the account as it 
has been retrieved from the MSN servers.

How can we save the new display picture on the MSN servers?

Cheers

Original issue reported on code.google.com by [email protected] on 15 Nov 2008 at 8:41

ContactEmailTypeType Messenger3

Hello all, I had a problem with ContactEmailTypeType, I had Excepion
because the application didn't know about ContactEmailTypeType Messenger3,
so i add this type and now the application work.

public enum ContactEmailTypeType {

        /// <remarks/>
        ContactEmailPersonal,

        /// <remarks/>
        ContactEmailBusiness,

        /// <remarks/>
        ContactEmailOther,

        /// <remarks/>
        ContactEmailMessenger,

        /// <remarks/>
        Messenger2,

        /// <remarks/>
        Messenger3,   //<-- add by me

        /// <remarks/>
        Passport,
    }


Bye bye,
   Lele from Italy

Original issue reported on code.google.com by [email protected] on 17 Jul 2008 at 1:21

Not possible to create a multi-user conversation.

What steps will reproduce the problem?
1. Try inviting two users to a conversation
2. Send a message


What is the expected output? What do you see instead?
It should invite both users to one conversation. Instead nothing happens.

What version of the product are you using? On what operating system?
The most recent

Please provide any additional information below.
Works fine in DotMSN 2.02 - I will be upgrading to this once you fix the
errors. :)

Original issue reported on code.google.com by [email protected] on 2 Sep 2008 at 4:16

Self account is listed in the account list.

What steps will reproduce the problem?
1. When I signed in by myself msn account.

What is the expected output? What do you see instead?

My singed-in msn account is listed in the contact list.

What version of the product are you using? On what operating system?
The New.

Sorry I could not judge this situation is right or not. May be, is my 
fault.




Original issue reported on code.google.com by [email protected] on 26 Oct 2008 at 8:53

TASK: StorageService Enhancements

1) Add DeleteReletionships to WSDL.

2) Upload new photo and attach reletionship with profile resource.

3) Remove photos and remove relations.

MSNStorageService.UploadNewPhoto()
MSNStorageService.RemovePhoto()
MSNStorageService.UpdateProfile(profileid, photoid)

Original issue reported on code.google.com by [email protected] on 27 Aug 2008 at 12:20

UrlDecode in MSNPSharp.MSNObject.ParseContext() resulting in mangled MSNObject SHA1D property

What steps will reproduce the problem?
1. Cause an MSNObject with a property containing a URL decodable character 
(such as a plus sign) to be sent to MSNPSharp.

What is the expected output? What do you see instead?

The expected output is an xml string correctly representing the received 
data. Instead, a seemingly unneeded UrlDecode is being performed on the xml 
string, resulting in xml containing decodable characters to become 
incorrectly converted.


What version of the product are you using? On what operating system?
Version 205 stable on Windows XP Pro.

Please provide any additional information below.
I finally narrowed this one down when I noticed that seemingly random 
MSNObject's weren't being recognized by other clients. In my case, the 
MSNObject that wasn't being recognized had a SHA1D containing a plus (+) 
character which was being converted to a space. On my local copy of the 
source, I have commented out the UrlDecode in 
MSNPSharp.MSNObject.ParseContext() such that:

            string xmlString = 
System.Web.HttpUtility.UrlDecode(context);            
            MatchCollection matches  = 
contextRe.Matches(xmlString);

becomes:

            //string xmlString = 
System.Web.HttpUtility.UrlDecode(context);            
            MatchCollection matches  = 
contextRe.Matches(context);

FYI, I'm not sure if there is some situation where the string is expected 
to come into the function encoded, but simply commenting the decode out 
seems to be working fine for me so far.


Original issue reported on code.google.com by [email protected] on 31 Oct 2008 at 1:31

auto accept friend requests

What steps will reproduce the problem?
1. sign on the official wlm client
2. in settings, disable both privacy checkboxes (only people on my allow
list, and alert me)
3. sign off wlm
4. sign on msnp-sharp
5. receive a friend request

What is the expected output? What do you see instead?
the friend request is not accepted.  It seems like this setting is just
stored on the server but the client has to implement actually accepting the
friend (this is retarded, but that's how it is)

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

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 25 Jul 2008 at 4:55

Error on XMLContactList.AddMemberhip

What steps will reproduce the problem?
1. enter username and password to login
2. the app begins to authenticate,after it, it begins to get friends data
3. after all,error begins

What is the expected output? What do you see instead?
output is fine,when recieves a message,it can be traced yet

What version of the product are you using? On what operating system?
svn 2.5

Please provide any additional information below.
hey,it is me again :) 
it seems that the error will be found some time,but some time not

trace code-------------------
未处理 System.Reflection.TargetInvocationException
  Message="Exception has been thrown by the target of an invocation."
  Source="mscorlib"
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, 
Object[] arguments, SignatureStruct& sig, MethodAttributes 
methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object
[] arguments, Signature sig, MethodAttributes methodAttributes, 
RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, 
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo 
culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo
(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper
(Object obj)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at 
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCle
anup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext 
executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext 
executionContext, ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback
(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage
(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc
(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr 
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& 
msg)
       at 
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.Unsa
feNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, 
Int32 reason, Int32 pvLoopData)
       at 
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 
reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop
(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at MSNPSharpClient.ClientForm.Main() in 
D:\Users\edwin\Desktop\msn\Example\DotMSNClient.cs:line 753
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] 
args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence 
assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext 
executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.ArgumentException
       Message="An item with the same key has already been added."
       Source="mscorlib"
       StackTrace:
            at System.ThrowHelper.ThrowArgumentException(ExceptionResource 
resource)
            at System.Collections.Generic.Dictionary`2.Insert(TKey key, 
TValue value, Boolean add)
            at System.Collections.Generic.Dictionary`2.Add(TKey key, 
TValue value)
            at MSNPSharp.IO.XMLContactList.AddMemberhip(ServiceFilterType 
servicetype, String account, ClientType type, MemberRole memberrole, 
BaseMember member) in 
D:\Users\edwin\Desktop\msn\MSNPSharp\IO\XMLContactList.cs:line 195
            at MSNPSharp.IO.XMLContactList.op_Addition(XMLContactList 
xmlcl, FindMembershipResultType findMembership) in 
D:\Users\edwin\Desktop\msn\MSNPSharp\IO\XMLContactList.cs:line 325
            at MSNPSharp.ContactService.<>c__DisplayClassa.<msRequest>b__6
(Object sender, FindMembershipCompletedEventArgs e) in 
D:\Users\edwin\Desktop\msn\MSNPSharp\ContactService.cs:line 484
            at 
MSNPSharp.MSNWS.MSNABSharingService.SharingServiceBinding.OnFindMembershipO
perationCompleted(Object arg) in D:\Users\edwin\Desktop\msn\MSNPSharp\Web 
References\MSNWS.MSNABSharingService\Reference.cs:line 149
       InnerException: 


Original issue reported on code.google.com by [email protected] on 21 Nov 2008 at 4:51

Problem with custom emoticon received

Hi all!
I have a problem when I receive a custom emoticon from other contact.
For example in your code there is this method:

void Conversation_MSNObjectDataTransferCompleted(object sender, 
MSNObjectDataTransferCompletedEventArgs e)
        {
            //This is just an example to tell you how to get the emoticon 
data.
            FileStream fs = new FileStream("emoicon_rcv_example.png", 
FileMode.OpenOrCreate);
            byte[] byt = new byte[e.ClientData.OpenStream().Length];
            e.ClientData.OpenStream().Seek(0, SeekOrigin.Begin);
            e.ClientData.OpenStream().Read(byt, 0, byt.Length);
            fs.Write(byt, 0, byt.Length);
            fs.Close();
        }

The problem is that the size of the file emoicon_rcv_example.png created is 
0 KB.

How can I solve this problem?

Lele from Italy

Original issue reported on code.google.com by [email protected] on 25 Oct 2008 at 10:18

ChangingTooRapdly error question

There are two questions when I using this example program.
1.
When I want to talk with my msn contacts. I open about five contacts 
conversationForm then close. Next time I want to open my contacts 
conversationform but serval error messages show ChangingTooRapdly...
Is it my operates error??

2.
When I want to block my contact then unblock. Repeatedly two times this 
operate. unblock and block will be mixed.

Original issue reported on code.google.com by [email protected] on 1 Sep 2008 at 2:44

MSNPSharp.NSMessageHandler.OnSignedOff fired multiple times

What steps will reproduce the problem?
1. Add a Trace.WriteLine to MSNPSharp.NSMessageHandler.OnSignedOff.
2. Start the DotMSNClient from Visual Studio.
3. Connect.
4. Once connected, disconnect by selecting Offline from the dropdown.

What is the expected output? What do you see instead?
The expected output is a single sign-off notification in the Output tab of 
VS. Instead, the notification is listed twice.

What version of the product are you using? On what operating system?
Rev 456 (trunk), Windows XP Pro.


Please provide any additional information below.
Note that multiple threads seem to be involved in this issue. This issue is 
compounded by further problems, such as a System.ObjectDisposedException 
(possibly thrown as a result of SocketMessageProcessor.Disconnect getting 
called multiple times).  

Since this issue seems to be some sort of threading issue, I thought I 
would point out that there are a lot of places in the code base that use 
Thread.Sleep(). I would recommend refactoring out the Thread.Sleep() calls 
such as the one in NSMessageProcessor.Disconnect(). These hard-coded 
timeouts should typically be avoided, a decent (though somewhat harsh) 
article I came across on this is 
http://msmvps.com/blogs/peterritchie/archive/2007/04/26/thread-sleep-is-a-
sign-of-a-poorly-designed-program.aspx.

On a related note, I noticed that MSNPSharp.NSMessageProcessor.DispatchMessage 
uses a copy of the array to 
avoid synchronization issues, while other places in the code base make use 
of the lock keyword. Perhaps DispatchMessage should be using "lock" instead 
of an array copy?

Original issue reported on code.google.com by [email protected] on 1 Nov 2008 at 2:07

ReverseAdded not firing

ReverseAdded is not fired when someones add the owner to their forward list.

In NS11MessageHandler.cs, OnADCReceived(NSMessage message), it is needed to
check that the 3rd parameter received starts with "C=" before treating the
ADC message as adding a contact to a group. My changes to this method are
as follows:

protected virtual void OnADCReceived(NSMessage message)
{
      if (message.CommandValues.Count == 4 && 
            message.CommandValues[2].ToString().StartsWith("C="))
      {
          ......
      }

      ......
}

Original issue reported on code.google.com by [email protected] on 26 Jul 2007 at 8:47

Hardcoded array indices in MSNPSharp.EmoticonMessage.ParseBytes() result in emoticon download problems

What steps will reproduce the problem?
1. Send more than one custom emoticon to MSNPSharp.

What is the expected output? What do you see instead?

Expected result is the automatic downloading of custom emoticons. Instead, 
only the first one is requested to be downloaded, but for as many times as 
there are unique custom emoticons.

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

Version is 205 stable on Windows XP Pro.


Please provide any additional information below.

The corrected code in MSNPSharp.EmoticonMessage.ParseBytes() is shown below 
(changes to 3 lines):

            for(int i = 0; i < values.Length - 1; i += 2)
            {
                Emoticon emoticon = new Emoticon();
                emoticon.Shortcut = values[i].Trim();
                emoticon.ParseContext(values[i+1].Trim());

                Emoticons.Add(emoticon);
            }


Original issue reported on code.google.com by [email protected] on 31 Oct 2008 at 1:22

MSNPSharp.Messenger.CleanUp() doesn't actually clean up [conversation switchboards, SLP handlers, P2P sessions].

MSNPSharp revision 19.

The MSNPSharp.Messenger class does not correctly clean up its conversation 
objects (or its slps/p2p sessions) on Messenger.Disconnect. The problem 
can be traced to the code at Messenger.CleanUp (indirectly called from 
Messenger.Disconnect). The code comment says that the method is supposed 
to "Clean up resources".

The bug is: CleanUp() does not actually do this.

To reproduce: call CleanUp() or Disconnect() while there are still active 
conversations. (Using the example program, you can do this by Signing In, 
chatting to a user, keeping the conversation window open, then clicking 
Sign Off).

What should happen is: Messenger.CleanUp() should close all existing 
conversations (for each conversation in conversations, Invoke 
conversation.switcboard.close), close all SLP handlers (for each slp in 
msnslps, invoke slp.dispose), and clear message sessions from the 
p2pHandler (this it does).

Messenger.CleanUp does call ArrayList.Clear, but ArrayList.Clear alone 
does not clean up the underlying resources (switchboard connections etc). 
That has to be done manually (or when the GC runs :-O ).

The result is: the conversation window is still active, and you can still 
chat with it (even though WLM says the user has gone offline).

What should happen is that all conversation windows are closed when you 
sign off (with all sockets being disconnected after that).

I've attached an updated Messenger.cs. CleanUp has been changed to call 
Conversation.Close for all conversations. Whilst I was at it, I also 
changed the collection to use Generics (seeing how you're heading in that 
direction).

Original issue reported on code.google.com by [email protected] on 11 Jun 2007 at 12:52

Attachments:

SignedIn event is never fired

The event is not fired in the demo program, or my own client.

version 2.0.5.0

my OnConnectionEstablished handler gets called
then a NS message is received (Content-Type: text/x-msmsgsprofile;)
if i am signed in from another client, it gets kicked

then nothing.

after waiting for some time, i sign back in on the other client.
MSNPSharp calls the OnSignedOff handler

Original issue reported on code.google.com by [email protected] on 2 Oct 2008 at 12:53

Problem with Font in message

Hi all, there is a problem with Font.
When i send a message with Font, for example, "Accent SF", the font send is:

TextMessage txt = new TextMessage("My message");
txt.Font = "Accent SF";

and the result that I send is:

X-MMS-IM-Format: FN=Accent+SF; EF=; CO=000000; CS=0; PF=22

instead of:

X-MMS-IM-Format: FN=Accent%20SF; EF=; CO=000000; CS=0; PF=22


So, i have edit my code in:

TextMessage txt = new TextMessage("My message");
txt.Font = "Accent%20SF";

But the error is this:

X-MMS-IM-Format: FN=Accent%2520SF; EF=; CO=000000; CS=0; PF=22

So, I have edit TextMessage.cs:

Instead of this:
builder.Append("FN=").Append(HttpUtility.UrlEncode(Font.ToString()));

I have replaced with this:

builder.Append("FN=").Append(Font.ToString());

Bye bye,

 Lele from Italy


Original issue reported on code.google.com by [email protected] on 6 Aug 2008 at 10:43

Communication problem

So it seems that there is a communication problem on mono. But I'm not
really sure why.

Here are some dump files of the communication.

I took them on tcpdump and treated them on WireShark to extract only MSN
communication.

Original issue reported on code.google.com by [email protected] on 4 Sep 2008 at 4:45

Attachments:

Messenger.connect got 241 error

What steps will reproduce the problem?
it's accident, we can't use msnpsharp to finish connect of account
"[email protected]" but smoothly when use msn client directly.
the password is "welcome", the login code is really very simple.

What is the expected output? What do you see instead?
should login in successfully, but we receive 241 server error.

What version of the product are you using? On what operating system?
lastest version of 2008-08-25.

Please provide any additional information below.
i track msnpsharp, and found the authentication step has been finished, 
but got error after BLP step.

Original issue reported on code.google.com by [email protected] on 25 Aug 2008 at 8:38

"+" instead of "%20"

Using, for example, as nick "Powered by MSNP-Sharp", on the Official MSN
Client it appears "Powered+by+MSNP-Sharp".
This happens because when the library does the URLEncode of the string it
returns "+" as spaces instead of "%20".
I solved this problem inserting at every URLEncode in NS15MessageHandler.cs
a  ".Replace("+", "%20")".

I recommend you correct this annoying "bug" ^_^

I'm sorry for my bad english :-)
Bye!


Original issue reported on code.google.com by [email protected] on 14 May 2008 at 5:31

Add DomainMember for Anonymous Web Chat which used at http://settings.messenger.live.com/Applications/WebSettings.aspx

What steps will reproduce the problem?
i cannot login by "hotmail.com" but can do it by "live.cn"


What is the expected output? What do you see instead?
---------------------hotmail--------------------
NSMessageProcessor: Parsing incoming NS command...
NSMessageProcessor: Dispatching incoming NS command: USR 9 OK 
[email protected] 1 0

NSMessageProcessor: Parsing incoming NS command...
NSMessageProcessor: Dispatching incoming NS command: SBS 0 null

NSMessageProcessor: Parsing incoming NS command...
NSMessageProcessor: Dispatching incoming NS command: MSG Hotmail Hotmail 
1254
MIME-Version: 1.0
Content-Type: text/x-msmsgsprofile; charset=UTF-8
LoginTime: 1227105657
EmailEnabled: 1
MemberIdHigh: 425982
MemberIdLow: -1714873081
lang_preference: 2052
preferredEmail: 
country: CN
PostalCode: 
Gender: 
Kid: 0
Age: 
BDayPre: 
Birthday: 
Wallet: 
Flags: 1073742915
sid: 72652
MSPAuth: 
EwBwAswbAQAUs1/VcBU2sH7mwYy3BysWZ71CRDGAAO3dgmQvMiJ8f6ZnkeKup8QPn1pdWvwjvFl
iGMFjtzzLVTTbQm5cRc+rdqLPjFJ1kxb8cYM+mj7/sM3p5Z34GA55+8vNJvthUGOAvFyuHFLbT4
qXeqUxSPMkQB0aNzk380qSCAg7cIXrGuTua4tRa8I/CoDnEMdOM3AmZQP1oY2eA2YAAAgt4oNnl
6A5jsABh1nhgzQtj/gumNI72G1l9Sv1oQUNXPN3FmKuUl1288ctqOtwbHPtoqfSlnMQ7cGnnSN9
OA4jAjy+SPzOLuTvhE3U2wc2MoKdBDI8ses32Gt4goxApJhvqTbvoiDyPVi2xLweoTmIkBxqxwO
vAlvoeksOyaRFpqXm7mKQqbWkKOdGLkFyfcIagYMBUN/GQHScvvNK4tSIgG9Utt/xhn643/wTXV
cRX/e+ImqdBdTouyHwDOWmVU5q0Tqhdb7XxCM6ywzX8VSIBPC+bmnk26WBlvxQWUGW+PYdiFj/k
l2kc65ByutnP2WxNkWj829/AIEkNBbe1/mRopWTZkLAAccPJrqR6BTrvb5yFFQU56pR6Jf0RyC2
DPwxjAgvH4KJ6BuyBfdCW7X077ZC6k1Zpj00aRVjzFLW4XHeOTJ2phCVcnzNfGA8lH1QN4p6c77
CSDNPFa77NQOpNoOVRp+vB6LjZHzIx6McwJa3PhctwGUNuCuoTNecCKIsNU4ik/KTYEYoasNTYO
/G2JQUdiVKQW2sFNupzqUKDIxHHxGEreujV691huH0dnDSnczkmNmE3uzSDQxQjE35L1tlOeece
hJgFdAB&p=
ClientIP: 116.228.22.233
ClientPort: 5412
ABCHMigrated: 1
Nickname: ??
MPOPEnabled: 1


NSMessageProcessor: Parsing incoming NS command...
NSMessageProcessor: Dispatching incoming NS command: UBX 
[email protected] 1 0

-------------------end-----------------------
"the live" that can be logined is here
--------------------live--------------------
NSMessageProcessor: Parsing incoming NS command...
NSMessageProcessor: Dispatching incoming NS command: USR 9 OK 
[email protected] 1 0

NSMessageProcessor: Parsing incoming NS command...
NSMessageProcessor: Dispatching incoming NS command: SBS 0 null

NSMessageProcessor: Parsing incoming NS command...
NSMessageProcessor: Dispatching incoming NS command: MSG Hotmail Hotmail 
1256
MIME-Version: 1.0
Content-Type: text/x-msmsgsprofile; charset=UTF-8
LoginTime: 1227105727
EmailEnabled: 1
MemberIdHigh: 245757
MemberIdLow: -1973441795
lang_preference: 2052
preferredEmail: 
country: CN
PostalCode: 
Gender: 
Kid: 0
Age: 
BDayPre: 
Birthday: 
Wallet: 
Flags: 1073743427
sid: 72652
MSPAuth: 
EwBwAswbAQAUs1/VcBU2sH7mwYy3BysWZ71CRDGAAOTt1HDxgzsLTSD7RfxH4/ah/l9M1QXuHAX
4JWTuVJvqQt88aHRCnQfhEEnud8pBZpOmSnQQ5OnWVtVS4UewCp5dSAq0G5DZgeTXHGh4PKq6Q3
UlewNOxNIhN6nGh003K5zFFboR+9luvdwsP2RdJl4sLBLgaOoPlppbupMcSf6hA2YAAAho9EamZ
1hylMABXE1hDSd/VPna92mGhrbWlvlgtDFArx95SN+TwiDBO+bJG2UZ2Ng1cQlGuWrWsGHv11xB
D47HGdjU0pOdDEaieCSmO7ueykMBqnAT8pCKts/Fx34lSX2gPLNu3glmMpYXO+dORXwRECCq/Yr
TQ6NjUrqZadhdtqj0l38xTCBactPQmkrTBzfyJo26yMTwEuxeC/r4ux/IIiZp7KcJuSZUAb4rEr
N5/F+RKw0ySkeNWW2GQ35m4iue9kaETwWYE5Xg8sRV1l5n8Z0sSc6VDPp5vsph1calmPera/abi
a//9G081OuZJgewNw3t9qE2i6+lpDob0bSnFtr6y4Af5+tVRwXXCyf/aveNCxBqpbvhbW7IqEI2
rF/TkZAwRnzDPe5GK5lnytZq3wrKu4ckBspCBiBfzkQkAEAxorjNXcnpMmwMyLqgrJpeVKDmxd+
qVuNl2sMWYqaX9OlF6dVG1RaWxLXGI2wWvdXJDFTK0jZCeVfzJGWjJsvpJeSj+7Cq0jEhZP9VGk
BjHdGVgDsFeGmezywYCm1zTykij1YDquK9JaY54wEjV7iqtFh+Tp2o+o+bEUv3Wjc7GJdxsiSZK
pKUecoB&p=
ClientIP: 116.228.22.233
ClientPort: 6436
ABCHMigrated: 1
Nickname: Pang
MPOPEnabled: 1
------------------end-----------------------


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

Please provide any additional information below.

i think the problem may be found out in difference of "hotmail"webservice 
and "live"one
but you know,the code is too complex..
i ask you for help...thanks

Original issue reported on code.google.com by [email protected] on 19 Nov 2008 at 2:58

MSNPSharp - Won't work on Mono... Suggested tweaks?

What steps will reproduce the problem?
1. Compile MSNPSharp on Monodevelop (or manually via gmcs)
2. Launch the example project (you might need to edit the Resources.resx to
fix path problems with images).
3. Try to connect to a MSN account.   The certificate/trusts fail.

What is the expected output? What do you see instead?
It should behave just like the Windows build.

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

Please provide any additional information below.

Mono doesn't implement the full WSS security model.  I'm thinking that's
what's happening here.  Is there some overrides I can do (such as setting
up an untrusted connection) to get MSNPSharp to work with the Mono.NET
framework?

Original issue reported on code.google.com by [email protected] on 6 Aug 2008 at 8:46

Emotion sample

Hee there,

How can i send a message with emoticons. I tryed everything i could think 
of, searched the whole world for a sample or solution but i found nothing. 
Can anyboy help me out here ?

Kind regards,


Victor Angelier
[email protected]

Original issue reported on code.google.com by [email protected] on 18 Jun 2007 at 12:40

offline message question

I had used the new demo program but something problem was happen when I  
sent messages to my contact when they were offline. I sent the offline 
message about 15 times continuous to different my contacts. This program 
will be hang on. I don't know what's happen. Is it a bug? 


Original issue reported on code.google.com by [email protected] on 11 Aug 2008 at 7:56

Messages sent to the wrong conversation.

What steps will reproduce the problem?
1. Have over 80 contacts.
2. Receive messages from 1 contact.

What is the expected output? What do you see instead?
Only 1 conversation should get the message. However, I'm seeing 3
TextMessageReceived event for 3 different contacts, including the
designated one.

What version of the product are you using? On what operating system?
MSNP 2.0.5 on Windows Vista.

Please provide any additional information below.
Is this related to the hashcode issue mentioned by freezingsoft in Issue 22?
Currently I'm bypassing this problem by checking the message sender and the
conversation owner before I send off the message.

Original issue reported on code.google.com by [email protected] on 3 Nov 2008 at 8:54

a bug about Messenger.Connected

Messenger.Connected is true after the messenger has signed in.
But, It's still true when another client has signed in to messenger on
another place.

I think this is a bug,can you fix it?

Thanks.


Original issue reported on code.google.com by [email protected] on 18 Jul 2008 at 9:22

ServiceFilterType

Hi all, 

I had a problem with ServiceFilterType because the API didn't knows
ServiceFilterType "Folder", so I add the line in reference.cs :

public enum ServiceFilterType {

        /// <remarks/>
        Messenger,

        /// <remarks/>
        Invitation,

        /// <remarks/>
        SocialNetwork,

        /// <remarks/>
        Space,

        /// <remarks/>
        Profile,

        /// <remarks/>  //<-- add by Lele
        Folder,
    }

Bye bye,
   Lele from Italy


Original issue reported on code.google.com by [email protected] on 24 Jul 2008 at 9:06

Problem with bot,..banned?

Hi, i have a problem with one bot.
I used msn-sharp from 2 months ago with this bot without problems,but from
yesterday the bot dont receive login events.I try the same application
(same dll,s etc) with other bot/username and the bot works fine, and I try
with the wrong user and Windows live and the bot works fine,but with
msnp-sharp not.Can you help me? is possible that the user can be banned
from Microsoft for no "legal" clients?

Thanks and sorry for my english.



Original issue reported on code.google.com by [email protected] on 29 Oct 2008 at 1:32

ContactList isn't thread-safe

What steps will reproduce the problem?
1. Intensive use, adding and removing contacts

What is the expected output? What do you see instead?
Sometimes I get 'Collection modified' exception when iterating over the
contacts
It shouldn't raise that exception

What version of the product are you using? On what operating system?
Revision 334 from subversion, WIN XP

Please provide any additional information below.
I think that ContactList class should have a property SyncRoot to expose a
way to lock the collection when iterating over it.

This implementation is taken from ArrayList class:
private object _syncRoot;
public object SyncRoot
{
  get
  {
    if (this._syncRoot == null)
    {
      Interlocked.CompareExchange(ref this._syncRoot, new object(), null);
    }
    return this._syncRoot;
  }
}





Original issue reported on code.google.com by [email protected] on 21 Jul 2008 at 7:09

Attachments:

TASK: Move contact related events to ContactService

All contact related events should go to ContactService from NSMessageHandler:

ContactAdded;
ContactRemoved;
ContactGroupAdded;
ContactGroupRemoved;
ReverseAdded;
ReverseRemoved;
SynchronizationCompleted;

Original issue reported on code.google.com by [email protected] on 27 Aug 2008 at 12:03

Thread unsafe

What steps will reproduce the problem?
1. Intensive use, sending and receiving messages

What is the expected output? What do you see instead?
Expected: Do not throw any exception
I get an exception when the library iterates over a Synchronized ArrayList.


What version of the product are you using? On what operating system?
Revision 334 from subversion


Please provide any additional information below.

You should wrap iterations over Synchronized ArrayList with locks like
this, according to documentation:
http://msdn.microsoft.com/en-us/library/3azh197k.aspx

lock (tsConversations.SyncRoot)
{
  foreach (Conversation conversation in tsConversations)
  {
    if (conversation.Switchboard == sender)
    {
      tsConversations.Remove(conversation);
      return;
    }
  }
}

This problem happens in the constructor and methods
Switchboard_SessionClosed and GetMSNSLPHandler of class Messenger



Original issue reported on code.google.com by [email protected] on 17 Jul 2008 at 8:38

Attachments:

Invalid length for a Base-64 char array.

What steps will reproduce the problem?
1. Receive an offline im (may take many tries with different messages)

What is the expected output? What do you see instead?
Expect not to crash.
instead received error: Exception has been thrown by the target of an
invocation.

What version of the product are you using? On what operating system?
MSNPSharp_205_stable_src.zip

Please provide any additional information below.
I tracked this down to OIMService.cs
error caused by:
regmsg.Match(e.Result.GetMessageResult).Value.Trim()
this can result in the "=" or "==" being trimmed off the end of a base64
encoded string, which causes the Convert.FromBase64String to throw an
unhandled exception.

Not sure this this same issue will occur in other places.

Original issue reported on code.google.com by [email protected] on 29 Aug 2008 at 1:52

CreateConversations failed

What steps will reproduce the problem?
1. CreateConversation for 10-15 times in a loop
2.
3.

What is the expected output? What do you see instead?
fore 7-8 conversations could be created successfully, but the 9th can't 
receive the server reponse and trigger SessionEstablished event.

What version of the product are you using? On what operating system?
latest in the post day

Please provide any additional information below.
I don't know whether for my net situation, but every time i try, it occurs.
When i create them one by one through a time queue, the problem still 
exists.
When i delay the last serveral conversations for a few minutes, 10-15 
conversations work fine. 

Original issue reported on code.google.com by [email protected] on 29 Aug 2008 at 8:04

ADL & {lockkey} problems

ADL
'Add List' command, uses XML to identify each contact, and works as a
payload message. Each ADL command may contain up to 150 contacts (a payload
of roughly 7500 bytes). The format of the payload looks like this: 

Code is:

NS15MessageHandler.cs (new)
--------------------

        private int adlcount = 0;
        private string[] ConstructADLString()
        {
            Dictionary<string, List<string>> d = new Dictionary<string,
List<string>>();

            string domain = "";
            string name = "";
            string type = "";
            string list = "";

            foreach (Contact contact in ContactList.All)
            {
                list = "";
                domain = contact.Mail.Split('@')[1];
                name = contact.Mail.Split('@')[0].Replace('ı', 'i');
                type = ((int)contact.ClientType).ToString();
                if (contact.OnForwardList)
                {
                    list = "3";
                }
                if (contact.OnBlockedList)
                {
                    list = ((int)(MSNLists.BlockedList)).ToString();
                }
                if (contact.OnAllowedList && !contact.OnForwardList)
                {
                    list = ((int)(MSNLists.AllowedList)).ToString();
                }

                if (!d.ContainsKey(domain.ToLower()))
                {
                    d[domain.ToLower()] = new List<string>();
                }

                d[domain.ToLower()].Add(
                                    "<c n=\"" + name + "\" l=\""
                                    + list
                                    + "\" t=\"" + type + "\"/>"
                );
            }


            List<string> ret = new List<string>();
            foreach (string dom in d.Keys)
            {
                adlcount++;
                int cnt = 0;
                string stmp = "<d n=\"" + dom + "\">";
                foreach (string c in d[dom])
                {
                    stmp += c;

                    if (++cnt == 150)
                    {
                        stmp += "</d>";
                        ret.Add("<ml l=\"1\">" + stmp + "</ml>");
                        stmp = "<d n=\"" + dom + "\">";
                        cnt = 0;
                        adlcount++;
                    }
                }

                stmp += "</d>";
                ret.Add("<ml l=\"1\">" + stmp + "</ml>");
            }

            return ret.ToArray();
        }



public virtual void SynchronizeContactList()

 {
                foreach (string ret in ConstructADLString())
                {
                    MessageProcessor.SendMessage(new NSMessage("ADL", new
string[] { Encoding.UTF8.GetByteCount(ret).ToString() }));
                    //MessageProcessor.SendMessage(new NSMessage("ADL", new
string[] { ret.Length.ToString() }));
                    MessageProcessor.SendMessage(new NSMessage(ret));
                }
            }


private void OnADLReceived(NSMessage message)
        {
            if (message.CommandValues[1].ToString() == "OK" && synSended ==
false && --adlcount <= 0)
{

                synSended = true;
                adlcount = 0;





 {lockkey} problems
------------------
SendOIMMessage()

reqsoap.Replace("{lockkey}", _Tickets.ContainsKey("lock_key") ?
HttpUtility.HtmlEncode(_Tickets["lock_key"]) : "");


// BASE64: Base64FormattingOptions.InsertLineBreaks
                reqsoap.Replace("{base64_msg}",
Convert.ToBase64String(Encoding.UTF8.GetBytes(msg),
Base64FormattingOptions.InsertLineBreaks));

NS15MessageHandler.cs // NOT _Tickets.Add, _Tickets["lock_key"] = md;
-----------------
protected virtual void OnCHLReceived(NSMessage message)
        {
            if (Credentials == null)
                throw new MSNPSharpException("No credentials available for
the NSMSNP11 handler. No challenge answer could be send.");

            clsQRYFactory qryfactory = new clsQRYFactory();
            string md = qryfactory.CreateQRY(Credentials.ClientID,
Credentials.ClientCode, message.CommandValues[1].ToString());
            _Tickets["lock_key"] = md;
            MessageProcessor.SendMessage(new NSMessage("QRY", new string[]
{ " " + Credentials.ClientID, " 32\r\n", md }));
        }













Original issue reported on code.google.com by [email protected] on 7 Apr 2008 at 12:48

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.