net: lib: zperf: fix compilation with UDP/TCP only
Fix regression introduced by #88747 that breaks linking with zperf server enabled but TCP or UDP disabled. Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
This commit is contained in:
parent
87e20308bd
commit
82b802f9ab
1 changed files with 10 additions and 0 deletions
|
@ -426,6 +426,11 @@ static int cmd_udp_download_stop(const struct shell *sh, size_t argc,
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_NET_UDP)) {
|
||||
shell_warn(sh, "UDP not supported");
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
ret = zperf_udp_download_stop();
|
||||
if (ret < 0) {
|
||||
shell_fprintf(sh, SHELL_WARNING, "UDP server not running!\n");
|
||||
|
@ -1494,6 +1499,11 @@ static int cmd_tcp_download_stop(const struct shell *sh, size_t argc,
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_NET_TCP)) {
|
||||
shell_warn(sh, "TCP not supported");
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
ret = zperf_tcp_download_stop();
|
||||
if (ret < 0) {
|
||||
shell_fprintf(sh, SHELL_WARNING, "TCP server not running!\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue