Skip to content

Commit

Permalink
Fix calcResponse nc error (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxjung authored Jan 6, 2022
1 parent 882e7c5 commit 2126d26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/auth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (auth *Authorization) CalcResponse(request sip.Request) *Authorization {
auth.nc += 1
hex := fmt.Sprintf("%x", auth.nc)
ncHex := "00000000"
auth.ncHex = ncHex[:len(ncHex)-1-len(hex)] + hex
auth.ncHex = ncHex[:len(ncHex)-len(hex)] + hex
// Nc-value = 8LHEX. Max value = 'FFFFFFFF'.
if auth.nc == 4294967296 {
auth.nc = 1
Expand Down

0 comments on commit 2126d26

Please sign in to comment.