refactor: 重命名 connection -> session

This commit is contained in:
2024-08-26 14:41:57 +08:00
parent a6cc98a32b
commit 82d3f99404
7 changed files with 31 additions and 33 deletions

View File

@ -16,7 +16,7 @@ func CreateSubscription(c *gin.Context) {
callbackURL := event.AttributedURIType(fmt.Sprintf("%s/onvif/subscriptions/%s/callback", config.Config.App.URL, xaddr))
log.Printf("CreateSubscription callback URL: %s", callbackURL)
conn := Conns[xaddr]
conn := Sessions[xaddr]
if conn == nil {
response.NewResponse().Fail("Connection not found").WithCode(http.StatusNotFound).Send(c)
return
@ -32,8 +32,7 @@ func CreateSubscription(c *gin.Context) {
}
func NotifyCallback(c *gin.Context) {
xaddr := c.Param("xaddr")
log.Printf("NotifyCallback from: %s", xaddr)
//xaddr := c.Param("xaddr")
var notify event.Notify
envelope := gosoap.NewSOAPEnvelope(&notify)