| 
					
				 | 
			
			
				@@ -1628,6 +1628,7 @@ void SetTelnetEnableStateStr(char *str) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #if defined HARDWARE_BT6709
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include "server.h"
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // ************************************************************************** //
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                             Параметры SSH
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /**
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1635,7 +1636,12 @@ void SetTelnetEnableStateStr(char *str) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   */
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 void SetSSHPortStr(char *str)
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    sSettings.sSSH.port = atoi(str);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    uint16_t new_port = atoi(str);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bool port_changed = new_port != sSettings.sSSH.port;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    sSettings.sSSH.port = new_port;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (port_changed) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ssh_server_restart();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /**
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1644,15 +1650,19 @@ void SetSSHPortStr(char *str) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 void SetSSHEnableStateStr(char *str)
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (strncmp(str, "on", 2) == 0) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        bool old_state = sSettings.sSSH.SSHEnable;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sSettings.sSSH.SSHEnable = 1;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (old_state != true) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ssh_server_init();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sSettings.sSSH.SSHEnable = 0;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ssh_server_restart();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #endif // HARDWARE_BT6709
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#endif
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#endif
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif // !BT6702_SERVICE
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif // HARDWARE_BT6707 || HARDWARE_BT6709
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // ************************************************************************** //
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                             Параметры даты и времени
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 |