Skip to content

Commit

Permalink
Fix commands not working in telnet #43 - release
Browse files Browse the repository at this point in the history
  • Loading branch information
sle118 committed Sep 1, 2020
1 parent a46bbb4 commit a90c980
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/telnet/telnet.c
Expand Up @@ -253,6 +253,10 @@ void process_received_data(const char * buffer, size_t size){
if(bMirrorToUART){
write(uart_fd, command, size);
}
for(int i=strlen(command);i>=0;i--){
// strip any cr/lf
if(command[i]== '\n' || command[i]== '\r') command[i]= '\0';
}
run_command((char *)command);
}
free(command);
Expand Down

0 comments on commit a90c980

Please sign in to comment.