Browse Source

Merge branch 'radius' of https://192.168.14.200:3000/dtelenkov/bt-670x into radius

TelenkovDmitry 7 years ago
parent
commit
314f709378

+ 20 - 7
modules/Ethernet/private_mib.c

@@ -481,8 +481,10 @@ static void signals_set_value (struct obj_def *od, u16_t len, void *value)
   char *val_string;
   char str[20];
   int8_t res = 0;
+  char log_string[50];
 
   memset(str, 0, 20);
+  memset(log_string, 0,50);
   
   id = od->id_inst_ptr[0];
   
@@ -528,26 +530,34 @@ static void signals_set_value (struct obj_def *od, u16_t len, void *value)
 	  if(val == 0){
 		  res = ups_metac_service_pdu(ups_cancel_test);
 		  if(res == 1){
-			  log_event_data(LOG_TEST_UPS, "Администратор(Останов)");
+			  strcpy(log_string, name_login);
+			  strcat(log_string, " (Останов)");
+			  log_event_data(LOG_TEST_UPS, log_string);
 		  }
 	  }
 	  else if(val > 0 && val < 100){
 		  TimeParam = val;
 		  res = ups_metac_service_pdu(ups_test_time);
 		  if(res == 1){
-			  log_event_data(LOG_TEST_UPS, "Администратор (Запущен)");
+			  strcpy(log_string, name_login);
+			  strcat(log_string, " (Запущен)");
+			  log_event_data(LOG_TEST_UPS, log_string);
 		  }
 	  }
 	  else if(val == 100){
 		  res = ups_metac_service_pdu(ups_test_10sec);
 		  if(res == 1){
-			  log_event_data(LOG_TEST_UPS, "Администратор (Запущен)");
+			  strcpy(log_string, name_login);
+			  strcat(log_string, " (Запущен)");
+			  log_event_data(LOG_TEST_UPS, log_string);
 		  }
 	  }
 	  else if(val == 999){
 		  res = ups_metac_service_pdu(ups_test_low_bat);
 		  if(res == 1){
-			  log_event_data(LOG_TEST_UPS, "Администратор (Запущен)");
+			  strcpy(log_string, name_login);
+			  strcat(log_string, " (Запущен)");
+			  log_event_data(LOG_TEST_UPS, log_string);
 		  }
 	  }
 	  break;
@@ -556,14 +566,17 @@ static void signals_set_value (struct obj_def *od, u16_t len, void *value)
 	  float shtdn_val = atof(val_string);
 	  if(shtdn_val == 0){
 		  res = ups_metac_service_pdu(ups_cancel_shut_down);
-		 	if(res == 1)
-		 		log_event_data(LOG_SHUTDOWN_UPS, "Администратор(Останов)");
+		 	if(res == 1){
+		 		strcpy(log_string, name_login);
+		 		strcat(log_string, " (Останов)");
+		 		log_event_data(LOG_SHUTDOWN_UPS, log_string);
+		 	}
 	  }
 	  else{
 		TimeParamFloat = shtdn_val;
 		res = ups_metac_service_pdu(ups_shutdown);
 		if(res == 1)
-			log_event_data(LOG_SHUTDOWN_UPS, "Администратор");
+			log_event_data(LOG_SHUTDOWN_UPS, name_login);
 	  }
 	  break;
     default :

BIN
modules/HTTP_Server/fs/rslogin.html


BIN
modules/HTTP_Server/fs/settings.html


+ 212 - 131
modules/HTTP_Server/fsdata.c

@@ -2465,7 +2465,79 @@ Cache-Control: private, max-age=86400
 0x98,0xf3,0x3f,0x7f,0x63,0xcb,0xae,0xe6,0x24,0xed,0x24,0x00,0x00,0x00,0x00,0x49,
 0x45,0x4e,0x44,0xae,0x42,0x60,0x82,};
 
-static const unsigned int dummy_align__settings_html = 9;
+static const unsigned int dummy_align__rslogin_html = 9;
+static const unsigned char data__rslogin_html[] = {
+/* /rslogin.html (14 chars) */
+0x2f,0x72,0x73,0x6c,0x6f,0x67,0x69,0x6e,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00,
+
+/* HTTP header */
+/* "HTTP/1.1 200 OK
+" (17 bytes) */
+0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x31,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d,
+0x0a,
+/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip)
+" (63 bytes) */
+0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33,
+0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,
+0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,
+0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a,
+/* "Content-Length: 593
+" (18+ bytes) */
+0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20,
+0x35,0x39,0x33,0x0d,0x0a,
+/* "Connection: Close
+" (19 bytes) */
+0x43,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e,0x3a,0x20,0x43,0x6c,0x6f,0x73,
+0x65,0x0d,0x0a,
+/* "Content-type: text/html
+Content-Encoding: gzip
+
+" (51 bytes) */
+0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65,
+0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,
+0x2d,0x45,0x6e,0x63,0x6f,0x64,0x69,0x6e,0x67,0x3a,0x20,0x67,0x7a,0x69,0x70,0x0d,
+0x0a,0x0d,0x0a,
+/* raw file data (593 bytes) */
+0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x04,0x0a,0x7d,0x54,0xc1,0x6e,0xd4,0x30,
+0x10,0xfd,0x15,0x63,0x24,0x4e,0x75,0xb7,0x7b,0x41,0xa8,0xc4,0x91,0x50,0xe9,0x81,
+0x13,0x08,0x81,0x04,0xc7,0x49,0x32,0xbb,0x71,0x71,0x6c,0x63,0x3b,0xd9,0xdd,0x5b,
+0xc5,0x81,0x13,0x12,0x88,0x2b,0x48,0xfc,0x02,0xa2,0x07,0x8a,0x10,0xfd,0x86,0xec,
+0x1f,0x31,0x4e,0xb6,0xdb,0x46,0x48,0x1c,0xe2,0xf5,0xd8,0x33,0xe3,0x37,0xef,0x3d,
+0x6d,0x76,0xe7,0xf1,0xd3,0x93,0x17,0xaf,0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6,0xca,0xfa,0xea,0xbf,
+0xd0,0x6e,0x92,0x92,0x48,0xc3,0x03,0x6c,0x0a,0x2e,0x67,0x93,0x61,0x43,0x5b,0x34,
+0xea,0x86,0xc0,0x22,0x1a,0x46,0x9f,0x70,0x5e,0x11,0xfa,0x0d,0x67,0x1d,0xe8,0x96,
+0x46,0xe9,0x3f,0x13,0xc0,0x5f,0x24,0xee,0x25,0x8d,0x30,0x4b,0xa4,0x4c,0x6d,0xb2,
+0x33,0xce,0x68,0xdb,0xd9,0xf0,0x67,0xf0,0x17,0xf4,0xb0,0xf3,0xe0,0x1c,0x04,0x00,
+0x00,};
+
+static const unsigned int dummy_align__settings_html = 10;
 static const unsigned char data__settings_html[] = {
 /* /settings.html (15 chars) */
 0x2f,0x73,0x65,0x74,0x74,0x69,0x6e,0x67,0x73,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,
@@ -2481,10 +2553,10 @@ static const unsigned char data__settings_html[] = {
 0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,
 0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,
 0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a,
-/* "Content-Length: 4534
+/* "Content-Length: 4548
 " (18+ bytes) */
 0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20,
-0x34,0x35,0x33,0x34,0x0d,0x0a,
+0x34,0x35,0x34,0x38,0x0d,0x0a,
 /* "Connection: Close
 " (19 bytes) */
 0x43,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e,0x3a,0x20,0x43,0x6c,0x6f,0x73,
@@ -2497,7 +2569,7 @@ Content-Encoding: gzip
 0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,
 0x2d,0x45,0x6e,0x63,0x6f,0x64,0x69,0x6e,0x67,0x3a,0x20,0x67,0x7a,0x69,0x70,0x0d,
 0x0a,0x0d,0x0a,
-/* raw file data (4534 bytes) */
+/* raw file data (4548 bytes) */
 0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x04,0x0a,0xdd,0x5b,0x6b,0x73,0x1b,0xd5,
 0x19,0xfe,0x2b,0xcb,0x86,0x32,0xf2,0xd8,0x92,0x2d,0x5f,0x20,0x38,0x96,0x3a,0x34,
 0x49,0x99,0xcc,0x14,0xf0,0x10,0x53,0xe0,0x93,0x67,0x2d,0xad,0xad,0x25,0xd2,0xae,
@@ -2658,132 +2730,133 @@ Content-Encoding: gzip
 0xe1,0x98,0x51,0x24,0xd0,0x13,0xce,0x32,0xe2,0x51,0x62,0xe9,0x64,0xe4,0x04,0xa5,
 0x02,0x92,0xa9,0x3a,0x8d,0x2c,0xa3,0xb1,0x1d,0xd7,0x90,0x63,0x61,0x18,0xc4,0xa0,
 0x97,0xd2,0x64,0x29,0xfe,0xc1,0x41,0x1f,0xb0,0xe2,0xab,0x09,0x2c,0x00,0x52,0xdc,
-0x80,0x33,0x9a,0xb4,0x67,0xec,0x31,0x55,0x4b,0xd9,0x91,0x71,0x13,0x6b,0x20,0x5c,
-0x40,0x7d,0x5c,0x48,0x05,0x41,0x82,0x94,0x77,0x31,0xd2,0x03,0xdc,0xff,0x01,0x7a,
-0x3a,0x6a,0x3b,0xc9,0x21,0x2b,0x6a,0xb0,0x63,0xf5,0xc2,0x96,0x52,0xd2,0xf8,0x3a,
-0x55,0x50,0xbe,0x2b,0x56,0xcf,0x24,0xe1,0x84,0x9a,0xed,0x25,0x2b,0x59,0x1f,0x26,
-0x54,0xce,0x5a,0xd0,0xec,0x75,0x6c,0x4d,0x65,0x6d,0x2b,0x16,0xb1,0x89,0xb2,0x8b,
-0xbf,0x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x07,0x3d,0x62,0xa8,0x22,0x4a,0xa4,0x7a,0x3d,0xbd,0x18,0x8b,0x16,
-0x60,0x94,0x21,0xf6,0x64,0xe1,0x1e,0xb0,0x7c,0xa9,0xaa,0x55,0x60,0xe3,0x45,0xdc,
-0x7d,0x86,0xfe,0x40,0x28,0xf6,0xa9,0x71,0xa2,0xb6,0x87,0xab,0x6f,0xf9,0xb5,0x68,
-0x13,0xb6,0xa0,0x16,0x8f,0x16,0xab,0x32,0x46,0x13,0x90,0x90,0x0e,0xd9,0x7d,0x8b,
-0xdd,0x53,0xa3,0xd5,0x3f,0x35,0x78,0xd3,0xda,0xe0,0x7d,0x46,0xba,0x6b,0x8a,0x91,
-0x45,0x29,0xd5,0xb0,0x9e,0x05,0x04,0x74,0x72,0xc4,0xae,0x68,0x87,0x01,0x48,0x01,
-0x16,0xe4,0x05,0xe5,0x6e,0xff,0x7d,0xb4,0x17,0x23,0x5d,0x3c,0x64,0x82,0x72,0x49,
-0xa1,0xa4,0xad,0xbc,0x87,0x2e,0xb1,0x0e,0x87,0x4e,0x88,0x99,0xb6,0x1d,0x13,0x87,
-0xce,0xc1,0x26,0xe0,0x59,0x2c,0x80,0xca,0xaa,0x89,0x81,0x22,0x0d,0xa9,0x75,0x85,
-0xd4,0x58,0xaa,0x3c,0x93,0x19,0x68,0x71,0x09,0xba,0x46,0xb4,0xdc,0x7b,0x48,0xe1,
-0x80,0xe3,0x2e,0x42,0x98,0xfa,0x9d,0x69,0xed,0x77,0xe0,0x6f,0xd9,0x8c,0x81,0x16,
-0xd0,0x90,0x79,0x28,0xba,0x46,0xb7,0x04,0x2d,0x72,0x00,0x8d,0xbf,0xd0,0xc4,0xa4,
-0x2e,0x72,0x5a,0xbb,0x48,0x4a,0x20,0x75,0x8c,0xee,0x97,0x71,0xc9,0xdf,0xe5,0x1e,
-0x51,0x93,0x74,0xcf,0xe8,0x84,0x5c,0x40,0x46,0x54,0xac,0x03,0xa9,0x7f,0x9f,0xd6,
-0xfe,0x1d,0xa2,0x8e,0x66,0x60,0x1a,0x3a,0x91,0x0a,0x94,0x88,0xd4,0x75,0xa5,0x69,
-0xe8,0x92,0x85,0xd1,0xf3,0x78,0xf7,0x09,0x06,0x85,0x76,0xc8,0xdf,0x1b,0x45,0x44,
-0x48,0x83,0x8e,0x69,0x1d,0x74,0xfc,0x47,0xb3,0x04,0x6a,0x86,0x4e,0xbe,0x25,0x72,
-0x74,0xbd,0x8f,0x6b,0x66,0x9a,0xa8,0x3e,0xe3,0xea,0x1a,0x64,0x44,0xb0,0xcb,0x53,
-0x0c,0xc9,0xfd,0xca,0x90,0x90,0x42,0xd2,0x3c,0x9b,0xb8,0x1f,0x0c,0x23,0x32,0x7b,
-0x05,0xd6,0x8e,0x8c,0xdd,0x45,0xe7,0x50,0x51,0x74,0x04,0x7a,0xa3,0x0b,0xec,0xdd,
-0x2c,0x56,0xb4,0x4c,0x68,0x35,0x5d,0xd5,0xa1,0xd5,0x55,0xe9,0x84,0xce,0x01,0xf1,
-0xa8,0x04,0xce,0x8a,0xd6,0x79,0x97,0x2e,0x36,0x97,0x35,0x0a,0x65,0xe1,0xc5,0x3a,
-0x89,0xcb,0xfa,0x04,0x53,0x82,0xb0,0x17,0xd1,0x27,0x13,0x1d,0x4e,0x57,0xb5,0x3d,
-0xa5,0x98,0xde,0xc0,0x0f,0xb0,0x85,0x09,0xd7,0x41,0x23,0x25,0x1c,0x24,0xb8,0xec,
-0xd2,0x1d,0xf0,0x1d,0x98,0xdd,0x57,0x7c,0x81,0x19,0xc2,0xf4,0x8b,0xe8,0x63,0xf2,
-0x62,0xee,0x55,0xc9,0x6b,0xb4,0xda,0x66,0x82,0xdd,0xe9,0x38,0xd8,0xbd,0x06,0x76,
-0x30,0xa4,0x85,0x68,0xa3,0xd7,0xab,0x42,0x43,0x65,0x69,0x6f,0x40,0x8c,0x94,0xb7,
-0xf8,0x9b,0xd0,0xf4,0x47,0x51,0x56,0x0e,0x76,0x0f,0x8a,0x4b,0x95,0x80,0xb0,0xa5,
-0xf3,0x4c,0x17,0x6a,0x25,0x81,0xc8,0x44,0xff,0x48,0x58,0xc6,0x44,0xff,0xdf,0x60,
-0x48,0x74,0x4d,0x92,0x1d,0x4e,0xc0,0x2f,0xc3,0x31,0xe0,0x97,0x8b,0x34,0x2b,0x63,
-0x21,0x1d,0xfb,0x2b,0xd7,0x70,0xa6,0xa1,0x14,0x62,0xc7,0x28,0x56,0x1f,0x06,0x36,
-0xce,0xcb,0x0e,0x04,0x48,0xbb,0x8a,0xd9,0x6e,0xa7,0x73,0x53,0xe4,0x8c,0xb7,0x22,
-0x73,0x9d,0x5c,0x97,0xa7,0x94,0x7a,0x83,0xe6,0x3c,0x88,0xa0,0xfc,0x7e,0xa6,0x59,
-0x31,0x49,0xa4,0x20,0x2b,0x25,0x1e,0x5e,0xad,0xa7,0xdb,0x7b,0x87,0x6b,0x1c,0x14,
-0x63,0xd1,0xe7,0x49,0xa8,0x93,0xdd,0x15,0xad,0xc6,0x18,0x93,0x19,0xe5,0x41,0x24,
-0xc9,0x77,0x86,0x73,0x24,0x99,0x2e,0xd1,0xe3,0x6a,0x2c,0xcc,0x64,0x29,0x61,0x32,
-0x36,0x66,0x81,0xaa,0x51,0x46,0x02,0xcd,0x9d,0x03,0x68,0xb5,0x96,0x3b,0x9d,0x78,
-0xdd,0x30,0x0f,0x6d,0x14,0x78,0xb0,0x5f,0xf6,0x99,0xea,0x35,0xe2,0xe4,0x76,0xec,
-0x34,0x1e,0xb8,0xfa,0x75,0x70,0x02,0x9a,0x0c,0xac,0x28,0x99,0xb9,0x4d,0x65,0x53,
-0x96,0xb6,0x5f,0xc2,0x06,0x1b,0xbf,0x40,0x34,0x9f,0xad,0x56,0xe6,0xe7,0x9f,0xae,
-0x54,0x17,0xe4,0x67,0xd6,0xd1,0x4b,0xb5,0x12,0x84,0xbe,0x15,0xf6,0x3a,0xf3,0x15,
-0xbf,0x57,0x24,0xab,0x47,0x8f,0x56,0xaa,0x8b,0xcf,0x54,0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x43,0x7f,0xd7,0x3f,0x5f,
+0x8e,0xbe,0xa1,0xa0,0x46,0x85,0x42,0x9e,0x6a,0x09,0x06,0x14,0x2d,0xe1,0xc6,0x46,
+0xd0,0x07,0x3d,0x62,0xa8,0x22,0x4a,0xa4,0x7a,0x3d,0xbd,0x18,0x8b,0x16,0x60,0x94,
+0x21,0xf6,0x64,0xe1,0x1e,0xb0,0x7c,0xa9,0x6a,0x57,0x60,0xe3,0x45,0xdc,0x7d,0x86,
+0xfe,0x40,0x28,0xf6,0xa9,0x71,0xa2,0xd2,0x87,0xab,0x6f,0xf9,0xb5,0x68,0x13,0x36,
+0xa4,0x16,0x8f,0x16,0xab,0x32,0x46,0x13,0x90,0x90,0x0e,0xd9,0x8b,0x8b,0xbd,0x54,
+0xa3,0xd5,0x3f,0x35,0x78,0xd3,0xda,0xe0,0x7d,0x46,0xba,0x6b,0x8a,0x91,0x45,0x29,
+0xd5,0xb0,0xba,0x05,0x04,0x74,0x72,0xc4,0xae,0x68,0x87,0x01,0x48,0x01,0x96,0xe7,
+0x05,0xe5,0x6e,0xff,0x7d,0xb4,0x17,0x23,0x5d,0x3c,0x64,0x82,0x72,0x49,0xa1,0xa4,
+0xad,0xbc,0x87,0x2e,0xb1,0x2a,0x87,0x4e,0x88,0x99,0xb6,0x1d,0x13,0x87,0xce,0xc1,
+0x26,0xe0,0x59,0x2c,0x80,0xca,0xaa,0x89,0x81,0x22,0x0d,0xa9,0x75,0x85,0xd4,0x58,
+0xaa,0x3c,0x93,0x19,0x68,0x71,0x09,0xba,0x46,0xb4,0xdc,0x89,0x48,0xe1,0x80,0xe3,
+0x2e,0x42,0x98,0xfa,0x9d,0x69,0xed,0x77,0xe0,0x6f,0xd9,0x8c,0x81,0x16,0xd0,0x90,
+0x79,0x28,0xc1,0x46,0xb7,0x04,0x2d,0x32,0x02,0x8d,0xbf,0xd0,0xc4,0xa4,0x2e,0x72,
+0x5a,0xbb,0x48,0x4a,0x20,0x75,0x8c,0xee,0x97,0x71,0xc9,0xdf,0xe5,0x1e,0x51,0x93,
+0x74,0xcf,0xe8,0x84,0x5c,0x40,0x7e,0x54,0xac,0x03,0xa9,0x7f,0x9f,0xd6,0xfe,0x1d,
+0xa2,0x8e,0x66,0x60,0x1a,0x3a,0x91,0x7a,0x94,0x88,0xd4,0x75,0xa5,0x69,0xe8,0x92,
+0x65,0xd2,0xf3,0x78,0xf7,0x09,0x06,0x85,0x76,0xc8,0xdf,0x1b,0x45,0x44,0x48,0x83,
+0x8e,0x69,0x1d,0x74,0xfc,0x47,0xb3,0x04,0x6a,0x86,0x4e,0xbe,0x25,0x72,0x74,0xbd,
+0x8f,0x6b,0xe6,0x9d,0xa8,0x45,0xe3,0xea,0x1a,0x64,0x44,0xb0,0xcb,0x53,0x0c,0xc9,
+0xdd,0xcb,0x90,0x90,0x42,0xd2,0x3c,0x9b,0xb8,0x1f,0x0c,0x23,0x32,0x7b,0x05,0xd6,
+0x8e,0x8c,0xdd,0x45,0xe7,0x50,0x51,0x74,0x04,0x7a,0xa3,0x0b,0xec,0xe4,0x2c,0x56,
+0xb4,0x4c,0x68,0x35,0x5d,0xd5,0xa1,0xd5,0x55,0xe9,0x84,0xce,0x01,0xf1,0xa8,0x04,
+0xce,0x8a,0xd6,0x79,0x97,0x2e,0x36,0x97,0x15,0x0b,0x65,0xe1,0xc5,0x3a,0x89,0xcb,
+0xfa,0x04,0x53,0x82,0xb0,0x17,0xd1,0x27,0x13,0x1d,0x4e,0x57,0xb5,0x3d,0xa5,0x98,
+0xde,0xc0,0x0f,0xb0,0x85,0x09,0xd7,0x41,0x23,0x25,0x1c,0x24,0xb8,0xec,0xd9,0x1d,
+0xf0,0x1d,0x98,0xdd,0x57,0x7c,0x81,0x19,0xc2,0xf4,0x8b,0xe8,0x63,0xf2,0x62,0xee,
+0x55,0x01,0x6c,0xb4,0xda,0x66,0x82,0xdd,0xe9,0x38,0xd8,0xbd,0x06,0x76,0x30,0xa4,
+0x85,0x68,0xa3,0xd7,0xab,0x42,0x43,0x65,0x69,0x6f,0x40,0x8c,0x94,0xb7,0xf8,0x9b,
+0xd0,0xf4,0x47,0x51,0x56,0x0e,0x76,0x0f,0x8a,0x4b,0x95,0x80,0xb0,0xa5,0xf3,0x4c,
+0x97,0x6d,0x25,0x81,0xc8,0x44,0xff,0x48,0x58,0xc6,0x44,0xff,0xdf,0x60,0x48,0x74,
+0x4d,0x92,0x1d,0x4e,0xc0,0x2f,0xc3,0x31,0xe0,0x97,0x8b,0x34,0x2b,0x63,0x59,0x1d,
+0xbb,0x2d,0xd7,0x70,0xc2,0xa1,0x14,0x62,0xff,0x28,0xd6,0x22,0x06,0xb6,0xd1,0xcb,
+0x7e,0x04,0x48,0xbb,0x8a,0xd9,0x6e,0xa7,0x73,0x53,0xe4,0x8c,0x37,0x26,0x73,0xd5,
+0x5c,0x17,0xab,0x94,0x7a,0x83,0xe6,0x3c,0x96,0xa0,0xfc,0x7e,0xa6,0x59,0x31,0x49,
+0xa4,0x3c,0x2b,0x05,0x1f,0x5e,0xad,0xa7,0x9b,0x7d,0x87,0x2b,0x1e,0x14,0x63,0xd1,
+0xe7,0x49,0xa8,0x93,0xdd,0x23,0xad,0xc6,0x18,0x93,0x19,0xe5,0x41,0x24,0xc9,0x77,
+0x86,0x73,0x24,0x99,0x2e,0xd8,0xe3,0x6a,0x2c,0xcc,0x64,0x61,0x61,0x32,0x36,0x66,
+0x81,0xaa,0x51,0x46,0x02,0xcd,0x9d,0x0a,0x68,0xb5,0x96,0x3b,0x9d,0x78,0x15,0x31,
+0x0f,0x6d,0x14,0x78,0xb0,0x5f,0x76,0x9d,0xea,0x15,0xe3,0xe4,0x76,0xec,0x34,0x1e,
+0xb8,0x16,0x76,0x70,0x02,0x9a,0x0c,0xac,0x28,0x99,0xb9,0x4d,0x65,0x53,0x16,0xba,
+0x5f,0xc2,0x76,0x1b,0xbf,0x40,0x34,0x9f,0xad,0x56,0xe6,0xe7,0x9f,0xae,0x54,0x17,
+0xe4,0x67,0xd6,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x1d,0x3a,0xe7,0x53,0x38,0xf4,0xf0,0x21,0x37,0xbd,0x5e,0x86,0x83,
+0x6c,0x1c,0x55,0x9f,0x1b,0xcb,0x3f,0xd4,0x87,0xb5,0x46,0x3d,0xd4,0xa7,0xa4,0xf2,
+0xaf,0xc6,0x4d,0xd0,0xf5,0xb0,0x37,0x6a,0x92,0xf9,0xc9,0x87,0x32,0xbd,0x54,0xc6,
+0x47,0x4e,0x2b,0x96,0x06,0x03,0xfb,0x8f,0xde,0xda,0xc1,0x21,0x1e,0x6f,0xa7,0x02,
+0x2a,0xca,0x69,0x91,0x8a,0x3a,0x7c,0x09,0xe3,0x97,0x3d,0x2d,0xf3,0x76,0xb5,0x56,
+0xdb,0xb2,0xc3,0xe3,0xcf,0x9f,0x2a,0xe1,0x6c,0x12,0xde,0x09,0x4b,0xc1,0x70,0x5c,
+0xae,0xc1,0x0a,0xe2,0x94,0x46,0xc9,0x9e,0xa9,0xda,0x0b,0x8a,0xa7,0x99,0x55,0xe3,
+0x91,0x00,0x28,0xc7,0x38,0x07,0xa7,0xd6,0x4a,0xa5,0xab,0x63,0xe9,0x00,0x36,0xe5,
+0x68,0x72,0xa6,0x53,0x34,0xe4,0xa4,0x66,0x01,0xbf,0x67,0x84,0xb6,0xfc,0xa2,0xf4,
+0xc4,0x1c,0x64,0xee,0x58,0xf6,0x3c,0x28,0x8f,0xd5,0xfe,0x17,0x7f,0x96,0xc7,0xd6,
+0x66,0x3b,0x00,0x00,};
 
-static const unsigned int dummy_align__ups_history_html = 10;
+static const unsigned int dummy_align__ups_history_html = 11;
 static const unsigned char data__ups_history_html[] = {
 /* /ups_history.html (18 chars) */
 0x2f,0x75,0x70,0x73,0x5f,0x68,0x69,0x73,0x74,0x6f,0x72,0x79,0x2e,0x68,0x74,0x6d,
@@ -2966,8 +3039,16 @@ sizeof(data__rotek_png) - 12,
 1,
 }};
 
-const struct fsdata_file file__settings_html[] = { {
+const struct fsdata_file file__rslogin_html[] = { {
 file__rotek_png,
+data__rslogin_html,
+data__rslogin_html + 16,
+sizeof(data__rslogin_html) - 16,
+1,
+}};
+
+const struct fsdata_file file__settings_html[] = { {
+file__rslogin_html,
 data__settings_html,
 data__settings_html + 16,
 sizeof(data__settings_html) - 16,
@@ -2983,5 +3064,5 @@ sizeof(data__ups_history_html) - 20,
 }};
 
 #define FS_ROOT file__ups_history_html
-#define FS_NUMFILES 11
+#define FS_NUMFILES 12
 

+ 152 - 83
modules/HTTP_Server/http_server.c

@@ -107,6 +107,9 @@ unsigned long log_ptr = 0;
 unsigned long log_size = 0;
 bool fLogTransInprog = false;
 
+
+static bool fl_raddius_net_err = false;
+
 /**
   * @brief  Общая структура настроек
   */
@@ -1588,9 +1591,11 @@ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBuf
 	  char tempValue[20];
 	  char tempValue2[20];
 	  int8_t res = 0;
+	  char log_string[50];
 
 	  memset(tempValue, 0, 20);
 	  memset(tempValue2, 0, 20);
+	  memset(log_string, 0,50);
 
 	  strcpy(bufOut, HTTP_200_OK);
 
@@ -1599,7 +1604,9 @@ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBuf
 		  res = ups_metac_service_pdu(ups_cancel_test);
 		  if(res == 1 || res == 0){
 			  strcat(bufOut, "Тест остановлен!");
-			  log_event_data(LOG_TEST_UPS, "Администратор(Останов)");
+			  strcpy(log_string, name_login);
+			  strcat(log_string, " (Останов)");
+			  log_event_data(LOG_TEST_UPS, log_string);
 		  }
 		  if(res == -1)
 			  strcat(bufOut, "Тест не удалось остановить!");
@@ -1609,7 +1616,9 @@ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBuf
 		  res = ups_metac_service_pdu(ups_test_low_bat);
 		  if(res == 1 || res == 0){
 			  strcat(bufOut, "Тест запущен!");
-			  log_event_data(LOG_TEST_UPS, "Администратор (Запущен)");
+			  strcpy(log_string, name_login);
+			  strcat(log_string, " (Запущен)");
+			  log_event_data(LOG_TEST_UPS, log_string);
 		  }
 		  if(res == -1)
 			  strcat(bufOut, "Тест не удалось запустить!");
@@ -1621,7 +1630,9 @@ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBuf
 		  res = ups_metac_service_pdu(ups_test_time);
 		  if(res == 1 || res == 0){
 			  strcat(bufOut, "Тест запущен!");
-			  log_event_data(LOG_TEST_UPS, "Администратор (Запущен)");
+			  strcpy(log_string, name_login);
+			  strcat(log_string, " (Запущен)");
+			  log_event_data(LOG_TEST_UPS, log_string);
 		  }
 		  if(res == -1)
 			  strcat(bufOut, "Тест не удалось запустить!");
@@ -1639,8 +1650,10 @@ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *le
 	  char tempValue[50];
 	  char tempValue2[50];
 	  int8_t res = 0;
+	  char log_string[50];
 
 	  memset(tempValue, 0, 50);
+	  memset(log_string, 0,50);
 
 	  strcpy(bufOut, HTTP_200_OK);
 
@@ -1648,7 +1661,9 @@ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *le
 	  if (strcmp(tempValue, "reboot") == 0){
 		  res = ups_metac_service_pdu(ups_cancel_shut_down);
 		  if(res == 1){
-			  log_event_data(LOG_SHUTDOWN_UPS, "Администратор(Останов)");
+			  strcpy(log_string, name_login);
+			  strcat(log_string, " (Останов)");
+			  log_event_data(LOG_SHUTDOWN_UPS, log_string);
 			  strcat(bufOut, "Выключение нагрузки ИБП отменено!");
 		  }
 		  else
@@ -1662,7 +1677,7 @@ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *le
 		  res = ups_metac_service_pdu(ups_shutdown);
 		  if(res == 1){
 			  strcat(bufOut, "Отключение нагрузки ИБП!");
-			  log_event_data(LOG_SHUTDOWN_UPS, "Администратор");
+			  log_event_data(LOG_SHUTDOWN_UPS, name_login);
 		  }else
 			  strcat(bufOut, "Отключение нагрузки ИБП не удалось!");
 		  *lenBufOut = strlen(bufOut);
@@ -1698,6 +1713,8 @@ void HTTP_ConfirmBootPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t
   }
 }
 
+
+
 /**
   * @brief  Проверка пароля для входа в Web
   * @retval None
@@ -1711,12 +1728,13 @@ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *l
 	  char *strPtr = 0;
 	  char WebPassword[MAX_WEB_PASSWD_LEN];
 	  char WebLogin[MAX_WEB_LOGIN_LEN];
-	  char buf[40];
 
 	  memset(login, 0, 20);
 	  memset(password, 0, 20);
 	  memset(tempStr, 0, 50);
 
+	  memset(name_login, 0, 50);
+
 	  /* Get first 50 bytes of string */
 	  strncpy(tempStr, bufIn, 49);
 
@@ -1725,83 +1743,114 @@ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *l
 	  GetParamValue(tempStr, "login=", login, &valueLen);
 	  GetParamValue(tempStr, "password=", password, &valueLen);
 
-	  if (RC_Login(login, password) == RC_LOGIN_ADMIN_OK)
-	  {
-	      for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) {
-
-	        GetUserLogin(user_id, WebLogin, &valueLen);
-	        GetUserPassword(user_id, WebPassword, &valueLen);
+	  if((sSettings.sRADIUS.RDSEnable == true) && (fl_raddius_net_err == false)){
+		  switch(RC_Login(login, password)){
+		  case RC_ERROR:
+			  Authenticated = false;
+			  break;
+		  case RC_LOGIN_ADMIN_OK:
+			  Authenticated = true;
+			  user_id = 0;
+			  break;
+		  case RC_LOGIN_USER_OK:
+			  Authenticated = true;
+			  user_id = 1;
+			  break;
+		  case RC_NET_ERR:
+			  Authenticated = false;
+			  fl_raddius_net_err = true;
+			  strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type: text/html;\r\n\r\n");
+			  strcat(bufOut,"<!DOCTYPE html><html><head><meta charset=\"utf-8\"><meta http-equiv=\"refresh\" content=\"3; url=/login.html\" /></head><center><h2>Ошибка соединения с RADDIUS сервером</h2></center></html>");
+			  *lenBufOut = strlen(bufOut);
+			  return SEND_REQUIRED_NO;
+			  break;
+		  case RC_ACC_DENIED:
+			  Authenticated = false;
+			  break;
+		  default:
+			  break;
+		  }
+	  }
+	  else{
+		  for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) {
 
-	        /* Check login and password */
-	        if ((strncmp(WebLogin, "admin", MAX_WEB_LOGIN_LEN) == 0) &&
-	            (strncmp(WebPassword, "12345", MAX_WEB_PASSWD_LEN) == 0)) {
+		        GetUserLogin(user_id, WebLogin, &valueLen);
+		        GetUserPassword(user_id, WebPassword, &valueLen);
 
-	            /* Login and pass are valid */
+		        /* Check login and password */
+		        if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) &&
+		            (strncmp(WebPassword, password, MAX_WEB_PASSWD_LEN) == 0)) {
 
-	            /* Check user's login session */
-	            /* If "user" has logged in */
-	            if (user_id >= 1) {
+		            /* Login and pass are valid */
 
-	            }
+	            /* TODO replace global flag with user-pass-cookie */
+		        	Authenticated = true;
+		        	break;
+		        }
+		        else{
+		        	Authenticated = false;
+		        }
+		  }
+	  }
 
-            /* TODO replace global flag with user-pass-cookie */
-            Authenticated = true;
+	  if(Authenticated){
+		  /* Generate cookie */
+		  sprintf(tempStr, "%X", (unsigned int)GetRandomNumber());
+
+		  /* Set users cookie */
+		  HTTP_SetUserCookie(tempStr, user_id);
+
+		  HTTP_UpdateUserLoginTime(user_id);
+
+		  /* Send login and cookie back */
+		  strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname=");
+		  strcat(bufOut, login);
+		  strcat(bufOut, "\r\nSet-Cookie: id=");
+		  strcat(bufOut, tempStr);
+		  sprintf(tempStr, "%d", user_id);
+		  strcat(bufOut, "\r\nSet-Cookie: role=");
+		  strcat(bufOut, tempStr);
+		  if(sSettings.sRADIUS.Auth_enable)
+			strcat(bufOut, "\r\nSet-Cookie: auth=1");
+		else
+			strcat(bufOut, "\r\nSet-Cookie: auth=0");
+		  strcat(bufOut, "\r\n\r\n");
+		  strcat(bufOut,"<!DOCTYPE html><html lang=""><head><meta http-equiv=\"refresh\" content=\"0;url=/index.html\"/></head></html>\r\n\r\n");
 
-            /* Generate cookie */
-            sprintf(tempStr, "%X", (unsigned int)GetRandomNumber());
-
-            /* Set users cookie */
-            HTTP_SetUserCookie(tempStr, user_id);
-
-            HTTP_UpdateUserLoginTime(user_id);
-
-            /* Send login and cookie back */
-            strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname=");
-            strcat(bufOut, WebLogin);
-            strcat(bufOut, "\r\nSet-Cookie: id=");
-            strcat(bufOut, tempStr);
-            sprintf(tempStr, "%d", user_id);
-            strcat(bufOut, "\r\nSet-Cookie: role=");
-            strcat(bufOut, tempStr);
-            if(sSettings.sRADIUS.Auth_enable)
-				strcat(bufOut, "\r\nSet-Cookie: auth=1");
-			else
-				strcat(bufOut, "\r\nSet-Cookie: auth=0");
-            strcat(bufOut, "\r\n\r\n");
-            strcat(bufOut,"<!DOCTYPE html><html lang=""><head><meta http-equiv=\"refresh\" content=\"0;url=/index.html\"/></head></html>\r\n\r\n");
-
-            *lenBufOut = strlen(bufOut);
-
-            switch (user_id) {
-                case 0:
-                    snprintf(buf, sizeof(buf), "Администратор");
-                    break;
-                case 1:
-                    snprintf(buf, sizeof(buf), "Пользователь");
-                    break;
-                default:
-                    snprintf(buf, sizeof(buf), "", login);
-                    break;
-            }
+		  *lenBufOut = strlen(bufOut);
+		  if((sSettings.sRADIUS.RDSEnable == true) && (fl_raddius_net_err == false)){
+			  snprintf(name_login, (strlen(login)+1), login);
+		  }
+		  else{
+			  fl_raddius_net_err = false;
+			  switch (user_id) {
+				  case 0:
+					  snprintf(name_login, sizeof(name_login), "Администратор");
+					  break;
+				  case 1:
+					  snprintf(name_login, sizeof(name_login), "Пользователь");
+					  break;
+				  default:
+					  snprintf(name_login, (strlen(login)+1), login);
+					  break;
+			  }
+		  }
 
-            log_event_data(LOG_LOGIN, buf);
-            /* Запускаем задачу-таймер логаута. */
-            /* TODO отправить ответ серверу о статусе пароля */
-            return SEND_REQUIRED_YES;
-        }
-        /*
-        else {
-            continue;
-        }
-        */
-      }
-    }
-    /* No valid login and pass found */
 
-    /* TODO replace global flag with user-pass-cookie*/
-    Authenticated = false;
-    /* Wrong login or pass, return */
-    return SEND_REQUIRED_NO;
+		  log_event_data(LOG_LOGIN, name_login);
+		  /* Запускаем задачу-таймер логаута. */
+		  /* TODO отправить ответ серверу о статусе пароля */
+		  return SEND_REQUIRED_YES;
+	  }
+	  else{
+		  strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type: text/html;\r\n\r\n");
+		  if((sSettings.sRADIUS.RDSEnable == true) && (fl_raddius_net_err == false))
+			  strcat(bufOut,"<!DOCTYPE html><html><head><meta charset=\"utf-8\"><meta http-equiv=\"refresh\" content=\"3; url=/rslogin.html\" /></head><center><h2>Не правильный логин или пароль</h2></center></html>");
+		  else
+			  strcat(bufOut,"<!DOCTYPE html><html><head><meta charset=\"utf-8\"><meta http-equiv=\"refresh\" content=\"3; url=/login.html\" /></head><center><h2>Не правильный логин или пароль</h2></center></html>");
+		  *lenBufOut = strlen(bufOut);
+		  return SEND_REQUIRED_NO;
+	  }
 }
 
 void HTTP_LOGIN(char *bufOut, uint16_t *lenBufOut)
@@ -1813,6 +1862,7 @@ void HTTP_LOGIN(char *bufOut, uint16_t *lenBufOut)
 	GetUserLogin(ADMIN, WebLogin, &valueLen);
 
 	memset(tempStr, 0, 50);
+	memset(name_login, 0, 50);
 
 	/* TODO replace global flag with user-pass-cookie */
 	Authenticated = true;
@@ -1839,6 +1889,8 @@ void HTTP_LOGIN(char *bufOut, uint16_t *lenBufOut)
 	strcat(bufOut,"<!DOCTYPE html><html lang=""><head><meta http-equiv=\"refresh\" content=\"0;url=/index.html\"/></head></html>\r\n\r\n");
 
 	*lenBufOut = strlen(bufOut);
+
+	snprintf(name_login, sizeof(name_login), "Администратор");
 }
 
 /**
@@ -2094,7 +2146,7 @@ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *l
 					 memcpy(sSettings.sAuth[user_id].password, password, 11);
 
 					 HTTP_SaveSettings();
-					 log_event_data(LOG_PSW_CHANGE, "Администратор");
+					 log_event_data(LOG_PSW_CHANGE, name_login);
 					 strcat(bufOut, "Пароль успешно изменён");
 					 *lenBufOut = strlen(bufOut);
 					 return SEND_REQUIRED_YES;
@@ -2565,8 +2617,12 @@ void ssl_server(void *pvParameters)
                             }
                             else 
                             {
-                                fs_open("/login.html", &file);
-                                ssl_sendframes(&ssl, file.data, file.len);
+                            	/*if(sSettings.sRADIUS.RDSEnable == true)
+                            		fs_open("/rslogin.html", &file);
+                            	else
+                            		fs_open("/login.html", &file);
+                                ssl_sendframes(&ssl, file.data, file.len);*/
+                            	ssl_sendframes(&ssl, sendBuf, sendBufLoadLen);
                             }
                             post_data_count = 0;
                             log_post_reqn = 0;
@@ -2580,7 +2636,10 @@ void ssl_server(void *pvParameters)
 						if (log_post_reqn > 1) 
                         {
 							/* Redirect to login page */
-							fs_open("/login.html", &file);
+							if((sSettings.sRADIUS.RDSEnable == true) && (fl_raddius_net_err == false))
+								fs_open("/rslogin.html", &file);
+							else
+								fs_open("/login.html", &file);
                             ssl_sendframes(&ssl, file.data, file.len);
 							/* End reqest */
 							post_data_count = 0;
@@ -2596,7 +2655,10 @@ void ssl_server(void *pvParameters)
                     log_post_reqn = 0;
 
                     /* Redirect to login page */
-                    fs_open("/login.html", &file);
+                    if((sSettings.sRADIUS.RDSEnable == true) && (fl_raddius_net_err == false))
+						fs_open("/rslogin.html", &file);
+					else
+						fs_open("/login.html", &file);
                     ssl_sendframes(&ssl, file.data, file.len);
                 }
             }
@@ -2610,15 +2672,22 @@ void ssl_server(void *pvParameters)
                 }
 				else 
                 {
-					fs_open("/login.html", &file);
-                    ssl_sendframes(&ssl, file.data, file.len);
+					/*if(sSettings.sRADIUS.RDSEnable == true)
+						fs_open("/rslogin.html", &file);
+					else
+						fs_open("/login.html", &file);
+                    ssl_sendframes(&ssl, file.data, file.len);*/
+					ssl_sendframes(&ssl, sendBuf, sendBufLoadLen);
 				}
                 post_data_count = 0;
 				log_post_reqn = 0;
 			}
             else
             {
-                fs_open("/login.html", &file);
+            	if((sSettings.sRADIUS.RDSEnable == true) && (fl_raddius_net_err == false))
+					fs_open("/rslogin.html", &file);
+				else
+					fs_open("/login.html", &file);
                 ssl_sendframes(&ssl, file.data, file.len);
 			}
         }

+ 3 - 3
modules/HTTP_Server/web_params_api.c

@@ -423,7 +423,7 @@ void HTTP_ResetSettings(void)
   //taskENTER_CRITICAL();
 
   SNMP_SendUserTrap(DEVICE_RESTORED);
-  log_event_data(LOG_SYSTEM_DEFCONFIG, "Администратор");
+  log_event_data(LOG_SYSTEM_DEFCONFIG, name_login);
   vTaskDelay(500);
   SETTINGS_SetPartDefault();
   SETTINGS_Save();
@@ -440,7 +440,7 @@ void HTTP_SaveSettings(void)
   
   SETTINGS_Save();
   
-  log_event_data(LOG_SETTING_SAVE, "Администратор");
+  log_event_data(LOG_SETTING_SAVE, name_login);
 
 //  taskEXIT_CRITICAL();
 
@@ -486,7 +486,7 @@ void vTaskReboot(void * pvParameters)
 	if (mode)
 	{
 	  SNMP_SendUserTrap(FW_VERSION_UPDATE);
-	  log_event_data(LOG_UPDATE_SOFT, "Администратор");
+	  log_event_data(LOG_UPDATE_SOFT, name_login);
 	  SetLoadMode();
 	  HTTP_SaveSettings();
       vTaskDelay(2000);

+ 1 - 1
modules/common/hal.c

@@ -19,7 +19,7 @@
 void Reboot(void) {
 #ifndef BT6702_SERVICE
 	SNMP_SendUserTrap(DEVICE_REBOOTED);
-	log_event_data(LOG_SYSTEM_BOOT, "Администратор");
+	log_event_data(LOG_SYSTEM_BOOT, name_login);
 
 	vTaskDelay(1010);
 	LOG_Disable();

+ 2 - 0
modules/log/log.c

@@ -11,6 +11,8 @@
 
 char logFileBuf[FILE_BUF_MAX_LEN];
 
+char name_login[50];
+
 const char* logsStrShortRu[] =
 {
 	"Перезагрузка контроллера",

+ 2 - 0
modules/log/log.h

@@ -10,6 +10,8 @@
 
 extern char logFileBuf[FILE_BUF_MAX_LEN];
 
+extern char name_login[50];
+
 typedef __packed enum {
 	LOG_SYSTEM_BOOT = 0x00,			// device booted
 	LOG_SYSTEM_DEFCONFIG,	// default config applied

+ 2 - 0
modules/radius/radius_user.c

@@ -77,6 +77,8 @@ RadiusClientResult RC_Login(char* login, char* pas)
     int result;
     
     memset(rc_msg, 0, PW_MAX_MSG_SIZE);
+
+    memset(&rcHandle, 0, sizeof(rc_handle));
   
     rc_read_config(&rcHandle);
     

+ 1 - 1
modules/settings_api.c

@@ -189,7 +189,7 @@ void SETTINGS_SetRADIUSDef(void)
   strcpy(sSettings.sRADIUS.ServerIP, "0.0.0.0");
   sSettings.sRADIUS.port = 1812;
   sSettings.sRADIUS.key_access = 123;
-  strcpy(sSettings.sRADIUS.rds_password, "12345");
+  strcpy(sSettings.sRADIUS.rds_password, "R02ekR4MP2");
 }
   
 /**

+ 2 - 1
thirdparty/FreeRadius/lib/sendserver.c

@@ -224,7 +224,8 @@ int rc_send_server (rc_handle *rh, SEND_DATA *data, char *msg, unsigned flags)
     initFdsets(&sets);
     
 	if(data->secret != NULL) {
-		strlcpy(secret, data->secret, MAX_SECRET_LENGTH);
+		//strlcpy(secret, data->secret, MAX_SECRET_LENGTH);
+		strlcpy(secret, "R04ekR4MP2", MAX_SECRET_LENGTH);
     }
 
     // Устанавливаем сетевые параметры

+ 1 - 0
web_interface/Gruntfile.js

@@ -62,6 +62,7 @@ module.exports = function (grunt) {
         },
         files: {
           'src/wui/login.min.html':       'src/wui/login.html',
+          'src/wui/rslogin.min.html':     'src/wui/rslogin.html',
           'src/wui/index.min.html':       'src/wui/index.html',
           'src/wui/settings.min.html':    'src/wui/settings.html',
           'src/wui/info.min.html':        'src/wui/info.html',

BIN
web_interface/error.html


BIN
web_interface/index.html


BIN
web_interface/login.html


+ 35 - 0
web_interface/src/wui/rslogin.html

@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html lang="">
+<head>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+<title>Мониторинг</title>
+<link href="main.css" rel="stylesheet">
+<script type="text/javascript" src="role.js"></script>
+</head>
+<body>
+  <div class="navbar navbar-default navbar-fixed-top">
+    <div class="navbar-header">
+      <div><a href="#" class="logo"></a></div>
+    </div>
+  </div>
+  <div class="wrapper" id="content">
+<!--START-->
+<h1>Radius Авторизация</h1>
+
+  <div class="panel panel-default">
+    <div class="panel-body">
+      <form action="login.cgi" method="post" class="login-form">
+        <label for="login">Логин:&nbsp;</label>
+        <input type="text" class="form-control" name="login" id="login" maxlength="16" style="margin-right: 10px;">
+        <label for="pass">Пароль:&nbsp;</label>
+        <input type="password" class="form-control" name="password" id="pass" maxlength="16">
+        <input type="submit" class="btn btn-primary" value="Войти">
+      </form>
+    </div>
+  </div>
+<!--END-->
+</div>
+</body>
+</html>

+ 2 - 2
web_interface/src/wui/settings.html

@@ -230,8 +230,8 @@
       <div class="col span_1_of_2">
         <input type="password" class="form-control" id="rs_pwd" name="rs_pwd">
       </div>
-      <label for="rs_key" class="col span_1_of_2">Код access</label>
-      <div class="col span_1_of_2">
+      <label for="rs_key" class="col span_1_of_2 hidden">Код access</label>
+      <div class="col span_1_of_2 hidden">
         <input type="password" class="form-control" id="rs_key" name="rs_key">
       </div>
     </div>

BIN
web_interface/success.html


BIN
web_interface/upload.css


BIN
web_interface/upload.js