Skip to content

Commit

Permalink
doc: mark SMPP5.0 as implented
Browse files Browse the repository at this point in the history
  • Loading branch information
“hujm” authored and hujm2023 committed Nov 26, 2023
1 parent 245ff0f commit 9fbd138
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Implementation of SMS Standard Protocol in Go Language

- [x] SMPP3.4
- [ ] SMPP5.0
- [x] SMPP5.0
- [x] CMPP2.0
- [x] CMPP3.0
- [ ] SGIP1.2
Expand Down
13 changes: 3 additions & 10 deletions smpp/smpp50/pdu_bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type BindResp struct {
// CString, max 16
SystemID string

tlvs map[uint16]smpp.TLV
tlvs smpp.TLVs
}

func (b *BindResp) IDecode(data []byte) error {
Expand All @@ -74,11 +74,7 @@ func (b *BindResp) IDecode(data []byte) error {

b.Header = smpp.ReadHeader(buf)
b.SystemID = buf.ReadCString()
tlv, err := smpp.ReadTLVs(buf)
if err != nil {
return err
}
b.tlvs = tlv
b.tlvs = smpp.ReadTLVs1(buf)

return buf.Error()
}
Expand All @@ -89,10 +85,7 @@ func (b *BindResp) IEncode() ([]byte, error) {

smpp.WriteHeaderNoLength(b.Header, buf)
buf.WriteCString(b.SystemID)
for _, value := range b.tlvs {
buf.WriteBytes(value.Bytes())
}

buf.WriteBytes(b.tlvs.Bytes())
return buf.BytesWithLength()
}

Expand Down

0 comments on commit 9fbd138

Please sign in to comment.