tcp_cmd
fix second message of unknown command
This commit is contained in:
@@ -386,7 +386,9 @@ err_t tcp_cmd_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err) {
|
||||
// Split string into tokens by delimiter (space)
|
||||
cmd_ptr = tcp_cmd_remove_leading_space(cmd, strlen(cmd));
|
||||
argv[0] = tcp_cmd_get_next_token(cmd_ptr, " ", &next);
|
||||
argc = 1;
|
||||
if(argv[0] != NULL) {
|
||||
argc = 1;
|
||||
}
|
||||
while (argv[argc - 1] != NULL && argc < MAX_TOKENS) {
|
||||
// Check if the next token is 0 (end of string) strlen doesn't work here
|
||||
if (*next == 0) {
|
||||
|
||||
Reference in New Issue
Block a user