| 
					
				 | 
			
			
				@@ -168,6 +168,7 @@ typedef struct{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	uint8_t num_connect; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	bool active_conn; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	bool flagWhiteListTelnet; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	bool flag_telnet_ip_option; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }telnetd_state_t; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 static portBASE_TYPE FreeRTOS_CLIAuthProcess( int8_t * pcWriteBuffer, telnetd_state_t *s  ); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -254,7 +255,13 @@ static void telnetd_input(telnetd_state_t *s) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				to be executed again. */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if( s->bufptr == 0 ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					strcpy( s->buf, s->prev_cmd ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					if(s->flag_telnet_ip_option ){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						s->flag_telnet_ip_option = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						strcpy( s->buf, s->prev_cmd ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				/* Transmit a line separator, just to make the 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -394,8 +401,8 @@ void parseopt(telnetd_state_t *ts, uint8_t code, uint8_t option) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     case TELOPT_TIMING_MARK: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    	memset(ts->prev_cmd, 0, cmdMAX_INPUT_SIZE ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     	xTimerStop(ts->RepeatSensorInfoTimer, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    	ts->flag_telnet_ip_option = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		sendopt(ts, TELNET_WILL, TELOPT_TIMING_MARK); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		sendopt(ts, TELNET_MARK, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if(ts->telnetState != TELNET_CHANGE_PWD && ts->telnetState != TELNET_CHANGE_PWD_ACK) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -850,6 +857,7 @@ void vBasicSocketsCommandInterpreterTask( void *pvParameters ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						auth_tlnt_srvr_param[cur_cnt].active_conn = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						auth_tlnt_srvr_param[cur_cnt].telnetState = TELNET_AUTH; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						auth_tlnt_srvr_param[cur_cnt].telnet_code_auth = USER; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						auth_tlnt_srvr_param[cur_cnt].flag_telnet_ip_option = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						xTimerStop(auth_tlnt_srvr_param[cur_cnt].RepeatSensorInfoTimer, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						cnt_conn -= 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						closesocket(i); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -876,6 +884,7 @@ void telnet_server_init(void) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		auth_tlnt_srvr_param[i].active_conn = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		auth_tlnt_srvr_param[i].telnetState = TELNET_AUTH; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		auth_tlnt_srvr_param[i].telnet_code_auth = USER; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		auth_tlnt_srvr_param[i].flag_telnet_ip_option = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		auth_tlnt_srvr_param[i].RepeatSensorInfoTimer = xTimerCreate("SensorInfoTmr", REPEAT_SENSOR_INFO_TIME, pdFALSE, ( void * ) i, SensorInfoTimerCallback); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	vRegisterCLICommands(); 
			 |