From 4080e622b7661c0f2305c3d4d84021a456a76ceb Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 8 Nov 2017 14:59:06 +0100 Subject: 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 --- src/host/layer23/src/mobile/script_nolua.c | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/host/layer23/src/mobile/script_nolua.c (limited to 'src/host/layer23/src/mobile/script_nolua.c') 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 +#include + +#include + + +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; +} -- cgit v1.2.3