|
@@ -79,7 +79,7 @@ func (m *Manager) closeInstance() {
|
|
|
//Remove the UPNP rules if enabled
|
|
|
enableUPnP := getUpnPEnabled(m.option.Sysdb)
|
|
|
|
|
|
- if enableUPnP {
|
|
|
+ if enableUPnP && m.option.Upnp != nil {
|
|
|
m.option.Upnp.ClosePort(m.listeningPort)
|
|
|
}
|
|
|
}
|
|
@@ -88,7 +88,7 @@ func (m *Manager) closeInstance() {
|
|
|
Handlers for handling config change
|
|
|
*/
|
|
|
|
|
|
-//Get or Set listening port for SFTP
|
|
|
+// Get or Set listening port for SFTP
|
|
|
func (m *Manager) HandleListeningPort(w http.ResponseWriter, r *http.Request) {
|
|
|
newport, _ := utils.PostPara(r, "port")
|
|
|
if newport == "" {
|
|
@@ -185,7 +185,7 @@ func (m *Manager) HandleToogleUPnP(w http.ResponseWriter, r *http.Request) {
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
- Functions requested by the file server service router
|
|
|
+Functions requested by the file server service router
|
|
|
*/
|
|
|
func (m *Manager) ServerToggle(enabled bool) error {
|
|
|
if m.instance != nil && !enabled {
|