Modified func Close in pkg/isapi/client.go to call '/ISAPI/System/TwoWayAudio/channels/<channel id>/close' instead of '/ISAPI/System/TwoWayAudio/channels/<channel id/close/open'

Modified pkg/isapi/client.go to call 'close' before 'open' to prevent channel left open from prior connection blocking with 401 or 403 errors.
This commit is contained in:
f1d094
2024-02-24 15:45:43 -08:00
parent 5fa31fe4d6
commit 3fa481bdfc
2 changed files with 22 additions and 4 deletions
+3 -1
View File
@@ -115,7 +115,9 @@ func Do(req *http.Request) (*http.Response, error) {
)
case "auth":
nc := "00000001"
cnonce := "00000001" // TODO: random...
// TODO: Random cnonce
// Here is temp static cnonce of required 32 bytes
cnonce := "ZDlmODczZTk2NjQyZTQ4OGQ5ZGEzOTI3YTc5Y2Q0ZGM="
response := HexMD5(ha1, nonce, nc, cnonce, qop, ha2)
header = fmt.Sprintf(
`Digest username="%s", realm="%s", nonce="%s", uri="%s", qop=%s, nc=%s, cnonce="%s", response="%s"`,