FreeCalypso > hg > themwi-interim
diff mtctest/disconnect.c @ 8:a902ccbf6bbc
mtctest: introduce general user command structure
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 09 Jun 2024 02:48:55 +0000 |
parents | e7b192a5dee5 |
children |
line wrap: on
line diff
--- a/mtctest/disconnect.c Sun Jun 09 01:56:27 2024 +0000 +++ b/mtctest/disconnect.c Sun Jun 09 02:48:55 2024 +0000 @@ -18,6 +18,7 @@ int disconnect_mode; +void send_disconnect_req() { struct gsm_mncc msg; @@ -31,3 +32,13 @@ send_mncc_to_gsm(&msg, sizeof(struct gsm_mncc)); disconnect_mode = 1; } + +void +disconnect_command() +{ + if (disconnect_mode) { + printf("Already in disconnect mode, command ignored\n"); + return; + } + send_disconnect_req(); +}