MazWoz / jsmpp

Automatically exported from code.google.com/p/jsmpp
Apache License 2.0
0 stars 0 forks source link

bind & deliver_sm problem #66

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
when smsc send bind response and immediately send deliver_sm after
bind_response, jsmpp discard deliver_sm as OPEN smpp state.

Original issue reported on code.google.com by Nikolai.Ivanoff@gmail.com on 5 Mar 2010 at 9:55

GoogleCodeExporter commented 8 years ago
p.s. version 2.1.0

Original comment by Nikolai.Ivanoff@gmail.com on 5 Mar 2010 at 10:24

GoogleCodeExporter commented 8 years ago
Hi, Do we have any workaround for this issue? I am facing a similar issue

Original comment by sreesn...@gmail.com on 21 Sep 2010 at 5:46

GoogleCodeExporter commented 8 years ago
may be it helps:

Index: src/main/java/org/jsmpp/session/SMPPSession.java
===================================================================
--- src/main/java/org/jsmpp/session/SMPPSession.java    (revision 7333)
+++ src/main/java/org/jsmpp/session/SMPPSession.java    (revision 7335)
@@ -563,15 +563,21 @@
                 pduHeader = pduReader.readPDUHeader(in);
                 pdu = pduReader.readPDU(in, pduHeader);

+                final PDUProcessTask task = new PDUProcessTask(pduHeader, pdu,
+                        sessionContext.getStateProcessor(), responseHandler,
+                        sessionContext, onIOExceptionTask);
+
+                if (sessionContext.getSessionState().isBound()) {
-                /*
-                 * When the processing PDU is need user interaction via event,
-                 * the code on event might take non-short time, so we need to
-                 * process it concurrently.
-                 */
+                    /*
+                     * When the processing PDU is need user interaction via 
event,
+                     * the code on event might take non-short time, so we need 
to
+                     * process it concurrently.
+                     */
-                PDUProcessTask task = new PDUProcessTask(pduHeader, pdu,
-                        sessionContext.getStateProcessor(), responseHandler,
-                        sessionContext, onIOExceptionTask);
-               executorService.execute(task);
+                    executorService.execute(task);
+                } else {
+                    // when not bounded, process tasks in single thread
+                    task.run();
+                }

            } catch (InvalidCommandLengthException e) {
                logger.warn("Receive invalid command length", e);

Original comment by Nikolai.Ivanoff@gmail.com on 28 Sep 2010 at 5:50

GoogleCodeExporter commented 8 years ago
Has anybody found a solution to this? I consider this a serious issue.

Original comment by ttroo...@hotmail.com on 5 Jul 2011 at 2:33

GoogleCodeExporter commented 8 years ago
Try this lib. I fixed small things!

Original comment by i...@sanmua.com on 12 Sep 2013 at 3:36

Attachments: