As mongoose is not anymore the only Webserver available, the entry
points *_mongoose can be renamed as *_webserver.
Signed-off-by: Stefano Babic <
stefan...@swupdate.org>
---
core/stream_interface.c | 1 -
core/swupdate.c | 6 +++---
include/swupdate.h | 2 +-
include/{mongoose_interface.h => webserver_interface.h} | 4 ++--
lws/lws_interface.c | 8 ++++----
mongoose/mongoose_interface.c | 8 ++++----
6 files changed, 14 insertions(+), 15 deletions(-)
rename include/{mongoose_interface.h => webserver_interface.h} (66%)
diff --git a/core/stream_interface.c b/core/stream_interface.c
index 6764d84e..45a8feb7 100644
--- a/core/stream_interface.c
+++ b/core/stream_interface.c
@@ -37,7 +37,6 @@
#include "parsers.h"
#include "network_ipc.h"
#include "network_interface.h"
-#include "mongoose_interface.h"
#include "installer.h"
#include "installer_priv.h"
#include "progress.h"
diff --git a/core/swupdate.c b/core/swupdate.c
index c9c2b75c..3bc1fded 100644
--- a/core/swupdate.c
+++ b/core/swupdate.c
@@ -36,7 +36,7 @@
#include "flash.h"
#endif
#include "lua_util.h"
-#include "mongoose_interface.h"
+#include "webserver_interface.h"
#include "download_interface.h"
#include "network_ipc.h"
#include "network_utils.h"
@@ -222,7 +222,7 @@ static void usage(char *programname)
#ifdef CONFIG_WEBSERVER
fprintf(stdout,
" -w, --webserver [OPTIONS] : Parameters to be passed to webserver\n");
- mongoose_print_help();
+ webserver_print_help();
#endif
}
@@ -1139,7 +1139,7 @@ int main(int argc, char **argv)
read_settings_user_id(&handle, "webserver", &uid, &gid);
start_subprocess(SOURCE_WEBSERVER, "webserver", uid, gid,
cfgfname, ac, av,
- start_mongoose);
+ start_webserver);
freeargs(av);
}
#endif
diff --git a/include/swupdate.h b/include/swupdate.h
index d6443e71..1c5729b9 100644
--- a/include/swupdate.h
+++ b/include/swupdate.h
@@ -11,7 +11,7 @@
#include <stdbool.h>
#include "bsdqueue.h"
#include "globals.h"
-#include "mongoose_interface.h"
+#include "webserver_interface.h"
#include "swupdate_dict.h"
#include "swupdate_image.h"
#include "hw-compatibility.h"
diff --git a/include/mongoose_interface.h b/include/webserver_interface.h
similarity index 66%
rename from include/mongoose_interface.h
rename to include/webserver_interface.h
index 49e033de..dd19aea0 100644
--- a/include/mongoose_interface.h
+++ b/include/webserver_interface.h
@@ -10,6 +10,6 @@
/*
* This is used by swupdate to start the Webserver
*/
-int start_mongoose(const char *cfgfname, int argc, char *argv[]);
+int start_webserver(const char *cfgfname, int argc, char *argv[]);
-void mongoose_print_help(void);
+void webserver_print_help(void);
diff --git a/lws/lws_interface.c b/lws/lws_interface.c
index 2d007a2c..c01cf457 100644
--- a/lws/lws_interface.c
+++ b/lws/lws_interface.c
@@ -31,7 +31,7 @@
#include <libwebsockets.h>
-#include "mongoose_interface.h"
+#include "webserver_interface.h"
#include "network_ipc.h"
#include "progress.h"
#include "util.h"
@@ -707,7 +707,7 @@ static struct option long_options[] = {
{ NULL, 0, NULL, 0 }
};
-void mongoose_print_help(void)
+void webserver_print_help(void)
{
fprintf(
stdout,
@@ -727,7 +727,7 @@ static void signal_handler(int signo) {
s_signo = signo;
}
-int start_mongoose(const char *cfgfname, int argc, char *argv[])
+int start_webserver(const char *cfgfname, int argc, char *argv[])
{
struct lws_opts opts = {
.port = LWS_DEFAULT_PORT,
@@ -791,7 +791,7 @@ int start_mongoose(const char *cfgfname, int argc, char *argv[])
if (optind < argc) {
ERROR("Non-option arguments given to lws, see --help.");
- mongoose_print_help();
+ webserver_print_help();
free(opts.document_root);
#ifdef CONFIG_MONGOOSESSL
free(opts.ssl_cert);
diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c
index a673fcf8..be826594 100644
--- a/mongoose/mongoose_interface.c
+++ b/mongoose/mongoose_interface.c
@@ -25,7 +25,7 @@
#include <getopt.h>
#include <network_ipc.h>
-#include <mongoose_interface.h>
+#include <webserver_interface.h>
#include <parselib.h>
#include <progress_ipc.h>
#include <swupdate_settings.h>
@@ -764,7 +764,7 @@ static struct option long_options[] = {
{NULL, 0, NULL, 0}
};
-void mongoose_print_help(void)
+void webserver_print_help(void)
{
fprintf(
stdout,
@@ -783,7 +783,7 @@ void mongoose_print_help(void)
MG_PORT, MG_ROOT);
}
-int start_mongoose(const char *cfgfname, int argc, char *argv[])
+int start_webserver(const char *cfgfname, int argc, char *argv[])
{
struct mongoose_options opts;
struct mg_mgr mgr;
@@ -866,7 +866,7 @@ int start_mongoose(const char *cfgfname, int argc, char *argv[])
if (optind < argc) {
ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
- mongoose_print_help();
+ webserver_print_help();
return -EINVAL;
}
--
2.43.0