summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/script_nolua.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-11-08 14:59:06 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-12-03 12:58:53 +0000
commit4080e622b7661c0f2305c3d4d84021a456a76ceb (patch)
treee4217e1c22b42af4fbc90c00e56b49272122deae /src/host/layer23/src/mobile/script_nolua.c
parent32dec4236e5bf3753bd84715d5e099272ea5d481 (diff)
mobile: Add initial support for scripting support
Right now the script will be executed once it is loaded. Make sure to write it into the config file last. Expose various log commands for logging. Jump through some hoops and get the filename and line number from lua. Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6
Diffstat (limited to 'src/host/layer23/src/mobile/script_nolua.c')
-rw-r--r--src/host/layer23/src/mobile/script_nolua.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/script_nolua.c b/src/host/layer23/src/mobile/script_nolua.c
new file mode 100644
index 00000000..61466f77
--- /dev/null
+++ b/src/host/layer23/src/mobile/script_nolua.c
@@ -0,0 +1,36 @@
+/* (C) 2017 by Holger Hans Peter Freyther
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <osmocom/bb/common/osmocom_data.h>
+#include <osmocom/bb/common/logging.h>
+
+#include <osmocom/vty/misc.h>
+
+
+int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename)
+{
+ vty_out(vty, "%% No LUA support compiled into mobile!%s", VTY_NEWLINE);
+ return -1;
+}
+
+int script_lua_close(struct osmocom_ms *ms)
+{
+ return 0;
+}