SmppClient.Query crashes with exception

Smpp v3.4 client

Moderator: alt

Locked
Otetz
Posts: 2
Joined: Wed Aug 27, 2008 4:42 pm

SmppClient.Query crashes with exception

Post by Otetz » Wed Aug 27, 2008 5:10 pm

This code

Code: Select all

try
{
    QuerySmResp resp = client.Query(id, SRC_TON, SRC_NPI, SRC_ADDR);
}
catch (Exception e)
{
    AddToLog(e.Message);
    AddToLog(e.StackTrace);
}
called with small timeout after SubmitText (when QUERY_SM_RESP cotains null in field final_date), generates that exception

Code: Select all

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at JlbOjsGLHcbdqiOUGV.aaAUfsyS0MilTbWpg9.n38v5qhZs(Int32& )
   at ALT.SMS.QuerySmResp..ctor(aaAUfsyS0MilTbWpg9 buf, Int32& offset)
   at ALT.SMS.SmppClient.LYfmIn7kT(MemoryStream& )
   at ALT.SMS.SmppClient.vulZoWhT1(IAsyncResult )
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.CompleteCallback(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
It's apper at real SMSC, also in SMSC simulator.
This exception crashes application :(
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Wed Aug 27, 2008 7:41 pm

Otetz
Posts: 2
Joined: Wed Aug 27, 2008 4:42 pm

Post by Otetz » Wed Aug 27, 2008 8:18 pm

alt wrote:Please try last version
http://www.inetlab.ru/Download/SmppClient.zip
Thanks! Its working. :D

But i encountered next problem - SmppClient.SubmitText send field registered_delivery always set to 0. This method doesn't usable with lazy quering of messages delivery, isn't it?
Locked