diff options
author | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2017-06-29 21:47:12 +0200 |
---|---|---|
committer | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2017-06-29 21:47:12 +0200 |
commit | 6ae2376c5cd933ef37f810340eb38b073d0acca2 (patch) | |
tree | 377358bac9d3a8ee20404ef830644752eb7e5d52 /src | |
parent | cffc0d638270fdb92577c4c9d92adb4bd3ca9526 (diff) |
module: check module-type for module_app directive
Diffstat (limited to 'src')
-rw-r--r-- | src/module.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c index 614f18d..926b161 100644 --- a/src/module.c +++ b/src/module.c @@ -120,6 +120,7 @@ static int module_tmp_handler(const struct pl *val, void *arg) static int module_app_handler(const struct pl *val, void *arg) { struct modapp *modapp; + const struct mod_export *me; debug("module: loading app %r\n", val); @@ -132,6 +133,12 @@ static int module_app_handler(const struct pl *val, void *arg) return 0; } + me = mod_export(modapp->mod); + if (0 != str_casecmp(me->type, "application")) { + warning("module_app %r should be type application (%s)\n", + val, me->type); + } + list_prepend(&modappl, &modapp->le, modapp); return 0; |