Comments (5)
@solaim please try to enable enquire_link. This way, connection are kept alive.
from gosmpp.
I try to dig code:
type SubmitSMResp struct {
base
MessageID string
}
// Marshal implements PDU interface.
func (c *SubmitSMResp) Marshal(b *ByteBuffer) {
c.base.marshal(b, func(b *ByteBuffer) {
b.Grow(len(c.MessageID) + 1)
_ = b.WriteCString(c.MessageID)
})
}
// Unmarshal implements PDU interface.
func (c *SubmitSMResp) Unmarshal(b *ByteBuffer) error {
return c.base.unmarshal(b, func(b *ByteBuffer) (err error) {
if c.CommandStatus == data.ESME_ROK {
c.MessageID, err = b.ReadCString()
}
return
})
}
what will happen when CommandStatus not ESME_ROK, MessageID is empty string, but In Marshal function, just
b.Grow(len(c.MessageID) + 1)
_ = b.WriteCString(c.MessageID)
maybe this is more better:
if len(c.MessageID) > 0 {
b.Grow(len(c.MessageID) + 1)
_ = b.WriteCString(c.MessageID)
}
from gosmpp.
@solaim good finding, I am making a fix here: #113
PTAL
from gosmpp.
LGTM
from gosmpp.
@solaim Thank you so much. I released a new version which includes above PR.
Please feel free to close this issue.
from gosmpp.
Related Issues (20)
- PDU/Network error: EOF on receive ESME_RTHROTTLED in submit sm resp HOT 6
- multipart message with our udh HOT 1
- Delivery Receipt Parameters HOT 12
- Long messages in the latest version HOT 6
- Relating submitted message with message id HOT 12
- is there a way to set a custom uuid with a short message and receive the uuid in reply/delivered callbacks? HOT 2
- ShouldSplit and Split behaviour when encoding is GSM7Bit HOT 7
- RX connector not working. Receiver not recieving data HOT 1
- Identification of current session is running or not HOT 1
- Setup addressRange for binding with SMSC HOT 1
- Do we support inactivity timers in this library? HOT 4
- connection is closing, can not send PDU to SMSC HOT 9
- Reconnecting to SMPP Server HOT 1
- how can save command string in log? HOT 2
- Store and Forward mode Option HOT 1
- General question not an issue! are delivery receipts and error codes standard and same across the platform? HOT 2
- Opening the ShortMessage HOT 6
- Implementation Question: Is there a way to check an error while hitting submit_sm ?
- Not receiving optional Parameters even after assigning them in submit_sm. HOT 6
- It's possible send flash sms? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gosmpp.