Skip to content

Commit

Permalink
Fix SubmitSMResp unmarshalling when CommandStatus != data.ESME_ROK (#113
Browse files Browse the repository at this point in the history
)
  • Loading branch information
linxGnu authored Sep 18, 2023
1 parent 42fdcca commit 07a9190
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions pdu/SubmitSMResp.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ func (c *SubmitSMResp) Marshal(b *ByteBuffer) {
// 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()
}
c.MessageID, err = b.ReadCString()
return
})
}
1 change: 1 addition & 0 deletions receivable.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func (t *receivable) handleOrClose(p pdu.PDU) (closing bool) {
}
return
}

switch pp := p.(type) {
case *pdu.EnquireLink:
if t.settings.response != nil {
Expand Down

0 comments on commit 07a9190

Please sign in to comment.