diff options
Diffstat (limited to 'alfred/patches/0004-alfred-Show-error-message-for-invalid-batadv-interfa.patch')
| -rw-r--r-- | alfred/patches/0004-alfred-Show-error-message-for-invalid-batadv-interfa.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/alfred/patches/0004-alfred-Show-error-message-for-invalid-batadv-interfa.patch b/alfred/patches/0004-alfred-Show-error-message-for-invalid-batadv-interfa.patch new file mode 100644 index 0000000..2112555 --- /dev/null +++ b/alfred/patches/0004-alfred-Show-error-message-for-invalid-batadv-interfa.patch @@ -0,0 +1,29 @@ +From: Sven Eckelmann <sven@narfation.org> +Date: Mon, 15 Feb 2021 19:56:22 +0100 +Subject: alfred: Show error message for invalid batadv interface + +The alfred server process always stopped without any informational message +when the provided batman-adv was not "none" and was not accessible. This +made it extremely hard to debug the reason why alfred directly stopped +after launching it. + +Signed-off-by: Sven Eckelmann <sven@narfation.org> +Forwarded: https://patchwork.open-mesh.org/project/b.a.t.m.a.n./patch/20210215200126.140253-1-sven@narfation.org/ + +diff --git a/server.c b/server.c +index 18109cc76283484a67f54fbc34f88039b9602531..47e9ae28b703da23fb930756d2971161ab332bc1 100644 +--- a/server.c ++++ b/server.c +@@ -385,8 +385,11 @@ int alfred_server(struct globals *globals) + } + + if (strcmp(globals->mesh_iface, "none") != 0 && +- batadv_interface_check(globals->mesh_iface) < 0) ++ batadv_interface_check(globals->mesh_iface) < 0) { ++ fprintf(stderr, "Can't start server: batman-adv interface %s not found\n", ++ globals->mesh_iface); + return -1; ++ } + + num_socks = netsock_open_all(globals); + if (num_socks <= 0) { |
