You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/04/13 03:29:33 UTC
[incubator-nuttx-apps] branch master updated:
wireless/wapi/src/wapi.c: When executing a command return it's error code
on failure.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new fbf5290 wireless/wapi/src/wapi.c: When executing a command return it's error code on failure.
fbf5290 is described below
commit fbf52904016aeabf9599ad834a6a21b82ecca981
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Mon Apr 12 10:11:05 2021 +0200
wireless/wapi/src/wapi.c: When executing a command return it's error code on failure.
Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
wireless/wapi/src/wapi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/wireless/wapi/src/wapi.c b/wireless/wapi/src/wapi.c
index 33a61c4..43a00ec 100644
--- a/wireless/wapi/src/wapi.c
+++ b/wireless/wapi/src/wapi.c
@@ -1025,6 +1025,7 @@ int main(int argc, FAR char *argv[])
FAR const struct wapi_command_s *wapicmd;
int sock;
int i;
+ int ret;
/* Get the command */
@@ -1084,7 +1085,8 @@ int main(int argc, FAR char *argv[])
return EXIT_FAILURE;
}
- if (wapicmd->handler(sock, argc - 2, argc == 2 ? NULL : &argv[2]) < 0)
+ ret = wapicmd->handler(sock, argc - 2, argc == 2 ? NULL : &argv[2]);
+ if (ret < 0)
{
WAPI_ERROR("ERROR: Process command (%s) failed.\n", cmdname);
}
@@ -1092,5 +1094,5 @@ int main(int argc, FAR char *argv[])
/* Close communication socket */
close(sock);
- return EXIT_SUCCESS;
+ return ret;
}