EldoS | Feel safer!

Software components for data protection, secure storage and transfer

GetMessageSource

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#18697
Posted: 01/12/2012 09:42:32
by Yves Roulet (Standard support level)
Joined: 01/12/2012
Posts: 9

Hello,

we have a strange behavior for the GetMessageSource (called in the OnUnhandledMessage event) if the server part of our solution run's in virtual machine with win xp. In fact the GetMessageSource return sometime a null string's. I say sometime, because it's a ramdom problem. Any sugestions or idea?
#18698
Posted: 01/12/2012 09:53:31
by Eugene Mayevski (EldoS Corp.)

1) What code package is used?
2) what is a null string in your case - is it NULL (in C++) or null in C# OR it is an empty string?


Sincerely yours
Eugene Mayevski
#18701
Posted: 01/12/2012 10:32:53
by Yves Roulet (Standard support level)
Joined: 01/12/2012
Posts: 9

1) we have clients in Delhi, c# (compact framework) and C#. The server is written in c# where we have the problem.
2)it's an empty string.
#18702
Posted: 01/13/2012 01:14:58
by Eugene Mayevski (EldoS Corp.)

Let's take a look at the source code of the method:

Code
   
public String GetMessageSource(ref MCMessage Message)
{
   MCMessageInfo Info;
   Monitor.Enter(this);
   Monitor.Enter(IncomingQueue);
   int i = FindMessageInQueue(Message.MsgID, IncomingQueue);
   if ( i != -1)
   {
      Info = (MCMessageInfo)IncomingQueue[i];
      Monitor.Exit(IncomingQueue);
      System.Threading.Monitor.Exit(this);
      if ((Info != null) && (FTransportList.IndexOf(Info.Transport) != -1))
      {
         try
         {
            return Info.Transport.GetMessageSource(ref Info);
         }
         catch(Exception)
         {
            return "";
         }
      }
   }
   else
   {
      Monitor.Exit(IncomingQueue);
      System.Threading.Monitor.Exit(this);
      return "";
   }
   return "";
}


As you see, the non-empty value is returned if the message is still in the incoming queue (has not been removed from the queue using MessageProcessed) and when the message references a valid transport (outside of transport context message source information has no meaning). Please review your code and update it to ensure the above conditions.


Sincerely yours
Eugene Mayevski
#18704
Posted: 01/13/2012 05:14:29
by Yves Roulet (Standard support level)
Joined: 01/12/2012
Posts: 9

Thanks,

we will look to our code to check that.
Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.

Reply

Statistics

Topic viewed 2929 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!