|
|
@@ -75,8 +75,13 @@ func AlarmStatus(exten string, status string) {
|
|
|
//check if actived
|
|
|
lfshook.NewLogger().Logger.Infof("===AlarmStatus=ext:%s===carr:%x==========pos:%x=========status:%x", exten, protocol.Data[0], protocol.Data[1], protocol.Data[2])
|
|
|
if active.Actived {
|
|
|
- SendToStc(socket.Conn, encoded)
|
|
|
- SendToStc(socket.Conn8, encoded)
|
|
|
+ if socket.Conn != nil {
|
|
|
+ SendToStc(socket.Conn, encoded)
|
|
|
+ }
|
|
|
+
|
|
|
+ if socket.Conn8 != nil {
|
|
|
+ SendToStc(socket.Conn8, encoded)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|