summaryrefslogtreecommitdiff
path: root/navit/command.c
diff options
context:
space:
mode:
authorsleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-12-25 18:50:11 +0000
committersleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-12-25 18:50:11 +0000
commit8bbc9cad114adc518d3252cb31f1ba0c33293cd2 (patch)
tree70469c55c4b11db1ff2d5bf00f75504532ae1716 /navit/command.c
parent351a4ed4bcdb8ce3dfa8bd609f849975233933ab (diff)
downloadnavit-8bbc9cad114adc518d3252cb31f1ba0c33293cd2.tar.gz
Fix:Core:Add warning for invalid commands.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4868 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/command.c')
-rw-r--r--navit/command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/navit/command.c b/navit/command.c
index 9beac9952..1523b6f16 100644
--- a/navit/command.c
+++ b/navit/command.c
@@ -443,10 +443,14 @@ command_call_function(struct context *ctx, struct result *res)
command_object_remove_attr(ctx, &res->attr, list[0]);
} else {
if (command_object_get_attr(ctx, &res->attr, attr_callback_list, &cbl)) {
- int valid;
+ int valid =0;
struct attr **out=NULL;
dbg(1,"function call %s from %s\n",function, attr_to_name(res->attr.type));
callback_list_call_attr_4(cbl.u.callback_list, attr_command, function, list, &out, &valid);
+ if (valid!=1){
+ dbg(0, "invalid command ignored: \"%s\"; see http://wiki.navit-project.org/index.php/"
+ "The_Navit_Command_Interface for valid commands.\n", function);
+ }
if (out && out[0]) {
attr_dup_content(out[0], &res->attr);
attr_list_free(out);