netifd: Fix proto shell setup/teardwon race condition
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 4 Dec 2014 12:07:16 +0000 (12:07 +0000)
committerSteven Barth <steven@midlink.org>
Mon, 8 Dec 2014 17:13:45 +0000 (18:13 +0100)
commit069b6b830492109f3e880063f7f52ce2329cb9b6
tree6ebdab340dfc0f1966a0be6aab7fe0471ffebbf0
parent9d8dd091f8f336b111364ed211165b5ec9842a24
netifd: Fix proto shell setup/teardwon race condition

Fix setup race condition when proto shell is in teardown or setup_abort state when setup cmd is received.
Don't change the proto shell state and launch no setup in these conditions so the proto shell teardown
timeout handler does not kill the wrong processes and proto_shell_task_finish takes action on the correct
teardown state.
Don't launch a new setup action when already in setup state.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
proto-shell.c