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
commitf0b30bc3330305b73a9ac6aa04b26284f459a7d8 (patch)
tree70469c55c4b11db1ff2d5bf00f75504532ae1716 /navit/command.c
parent6f226616e8ed38ac0eedbf4119c5c3959ab3b4eb (diff)
downloadnavit-svn-f0b30bc3330305b73a9ac6aa04b26284f459a7d8.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 9beac995..1523b6f1 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);