Skip to content

Commit 972c5a3

Browse files
author
Alexander Koriagin
committed
Header().Key() -> Header().Seq
1 parent a82a321 commit 972c5a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+27475
-8
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
*.swp
2+
.idea
3+
.DS_Store

go.sum

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSY
33
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
44
github.com/fiorix/go-smpp v0.0.0-20210403173735-2894b96e70ba h1:vBqABUa2HUSc6tj22Tw+ZMVGHuBzKtljM38kbRanmrM=
55
github.com/fiorix/go-smpp v0.0.0-20210403173735-2894b96e70ba/go.mod h1:VfKFK7fGeCP81xEhbrOqUEh45n73Yy6jaPWwTVbxprI=
6+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
67
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
78
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
89
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=

smpp/transceiver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (t *Transceiver) Bind() <-chan ConnStatus {
4343
return t.cl.Status
4444
}
4545
t.tx.Lock()
46-
t.tx.inflight = make(map[string]chan *tx)
46+
t.tx.inflight = make(map[uint32]chan *tx)
4747
t.tx.Unlock()
4848
c := &client{
4949
Addr: t.Addr,

smpp/transmitter.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type Transmitter struct {
5353
tx struct {
5454
count int32
5555
sync.Mutex
56-
inflight map[string]chan *tx
56+
inflight map[uint32]chan *tx
5757
}
5858
}
5959

@@ -74,7 +74,7 @@ func (t *Transmitter) Bind() <-chan ConnStatus {
7474
return t.cl.Status
7575
}
7676
t.tx.Lock()
77-
t.tx.inflight = make(map[string]chan *tx)
77+
t.tx.inflight = make(map[uint32]chan *tx)
7878
t.tx.Unlock()
7979
c := &client{
8080
Addr: t.Addr,
@@ -119,9 +119,9 @@ func (t *Transmitter) handlePDU(f HandlerFunc) {
119119
if err != nil || p == nil {
120120
break
121121
}
122-
key := p.Header().Key()
122+
seq := p.Header().Seq
123123
t.tx.Lock()
124-
rc := t.tx.inflight[key]
124+
rc := t.tx.inflight[seq]
125125
t.tx.Unlock()
126126
if rc != nil {
127127
rc <- &tx{PDU: p}
@@ -285,13 +285,13 @@ func (t *Transmitter) do(p pdu.Body) (*tx, error) {
285285
}
286286
}
287287
rc := make(chan *tx, 1)
288-
key := p.Header().Key()
288+
seq := p.Header().Seq
289289
t.tx.Lock()
290-
t.tx.inflight[key] = rc
290+
t.tx.inflight[seq] = rc
291291
t.tx.Unlock()
292292
defer func() {
293293
t.tx.Lock()
294-
delete(t.tx.inflight, key)
294+
delete(t.tx.inflight, seq)
295295
t.tx.Unlock()
296296
}()
297297
err := t.cl.Write(p)

vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)