Skip to content

Commit 66313f7

Browse files
committed
[nrf fromlist] 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. Upstream PR #: 89988 Signed-off-by: Damian Krolik <[email protected]>
1 parent 43c5dc7 commit 66313f7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

subsys/net/lib/zperf/zperf_shell.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,11 @@ static int cmd_udp_download_stop(const struct shell *sh, size_t argc,
426426
{
427427
int ret;
428428

429+
if (!IS_ENABLED(CONFIG_NET_UDP)) {
430+
shell_warn(sh, "UDP not supported");
431+
return -ENOEXEC;
432+
}
433+
429434
ret = zperf_udp_download_stop();
430435
if (ret < 0) {
431436
shell_fprintf(sh, SHELL_WARNING, "UDP server not running!\n");
@@ -1492,6 +1497,11 @@ static int cmd_tcp_download_stop(const struct shell *sh, size_t argc,
14921497
{
14931498
int ret;
14941499

1500+
if (!IS_ENABLED(CONFIG_NET_TCP)) {
1501+
shell_warn(sh, "TCP not supported");
1502+
return -ENOEXEC;
1503+
}
1504+
14951505
ret = zperf_tcp_download_stop();
14961506
if (ret < 0) {
14971507
shell_fprintf(sh, SHELL_WARNING, "TCP server not running!\n");

0 commit comments

Comments
 (0)