From 4c36581b96dfb81c85f34a4229d82e51edeaf499 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 14 Feb 2016 15:24:11 +0100 Subject: [PATCH] CHG: clearCommandBuffer(); before calling cmdparser. --- client/cmddata.c | 4 ++-- client/cmdhf.c | 15 +++++++-------- client/cmdhw.c | 4 ++-- client/cmdlf.c | 15 +++++++-------- client/cmdlfawid.c | 1 + client/cmdlfem4x.c | 7 +++---- client/cmdlfhid.c | 1 + client/cmdlfhitag.c | 7 +++---- client/cmdlfio.c | 15 +++++++-------- client/cmdlfpcf7931.c | 7 +++---- client/cmdlfpresco.c | 1 + client/cmdlft55xx.c | 9 +++++---- client/cmdlfti.c | 9 +++++---- client/cmdlfviking.c | 1 + client/cmdscript.c | 8 ++++---- 15 files changed, 52 insertions(+), 52 deletions(-) diff --git a/client/cmddata.c b/client/cmddata.c index ab89bb30b..238631318 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -2411,8 +2411,8 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdData(const char *Cmd) -{ +int CmdData(const char *Cmd){ + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdhf.c b/client/cmdhf.c index f6fb3a992..be842a34d 100644 --- a/client/cmdhf.c +++ b/client/cmdhf.c @@ -783,14 +783,13 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdHF(const char *Cmd) -{ - CmdsParse(CommandTable, Cmd); - return 0; +int CmdHF(const char *Cmd) { + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } -int CmdHelp(const char *Cmd) -{ - CmdsHelp(CommandTable); - return 0; +int CmdHelp(const char *Cmd) { + CmdsHelp(CommandTable); + return 0; } diff --git a/client/cmdhw.c b/client/cmdhw.c index 03f4186ff..111121189 100644 --- a/client/cmdhw.c +++ b/client/cmdhw.c @@ -473,8 +473,8 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdHW(const char *Cmd) -{ +int CmdHW(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdlf.c b/client/cmdlf.c index 924e0fea5..29fe6f124 100644 --- a/client/cmdlf.c +++ b/client/cmdlf.c @@ -1236,14 +1236,13 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdLF(const char *Cmd) -{ - CmdsParse(CommandTable, Cmd); - return 0; +int CmdLF(const char *Cmd) { + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } -int CmdHelp(const char *Cmd) -{ - CmdsHelp(CommandTable); - return 0; +int CmdHelp(const char *Cmd) { + CmdsHelp(CommandTable); + return 0; } diff --git a/client/cmdlfawid.c b/client/cmdlfawid.c index 4a2001391..d98dee4f9 100644 --- a/client/cmdlfawid.c +++ b/client/cmdlfawid.c @@ -255,6 +255,7 @@ static command_t CommandTable[] = { }; int CmdLFAWID(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdlfem4x.c b/client/cmdlfem4x.c index 4eaabef36..25cc075be 100644 --- a/client/cmdlfem4x.c +++ b/client/cmdlfem4x.c @@ -611,14 +611,13 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdLFEM4X(const char *Cmd) -{ +int CmdLFEM4X(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } -int CmdHelp(const char *Cmd) -{ +int CmdHelp(const char *Cmd) { CmdsHelp(CommandTable); return 0; } diff --git a/client/cmdlfhid.c b/client/cmdlfhid.c index 85d72b67a..ff25d07e6 100644 --- a/client/cmdlfhid.c +++ b/client/cmdlfhid.c @@ -372,6 +372,7 @@ static command_t CommandTable[] = { }; int CmdLFHID(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdlfhitag.c b/client/cmdlfhitag.c index 81822eb69..95d85c6e1 100644 --- a/client/cmdlfhitag.c +++ b/client/cmdlfhitag.c @@ -267,14 +267,13 @@ static command_t CommandTable[] = { {NULL, NULL, 0, NULL} }; -int CmdLFHitag(const char *Cmd) -{ +int CmdLFHitag(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } -int CmdHelp(const char *Cmd) -{ +int CmdHelp(const char *Cmd) { CmdsHelp(CommandTable); return 0; } diff --git a/client/cmdlfio.c b/client/cmdlfio.c index aa21c44ba..5c70f99d9 100644 --- a/client/cmdlfio.c +++ b/client/cmdlfio.c @@ -73,14 +73,13 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdLFIO(const char *Cmd) -{ - CmdsParse(CommandTable, Cmd); - return 0; +int CmdLFIO(const char *Cmd){ + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } -int CmdHelp(const char *Cmd) -{ - CmdsHelp(CommandTable); - return 0; +int CmdHelp(const char *Cmd) { + CmdsHelp(CommandTable); + return 0; } diff --git a/client/cmdlfpcf7931.c b/client/cmdlfpcf7931.c index 23efd2e73..5cc576fe5 100644 --- a/client/cmdlfpcf7931.c +++ b/client/cmdlfpcf7931.c @@ -165,14 +165,13 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdLFPCF7931(const char *Cmd) -{ +int CmdLFPCF7931(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } -int CmdHelp(const char *Cmd) -{ +int CmdHelp(const char *Cmd) { CmdsHelp(CommandTable); return 0; } diff --git a/client/cmdlfpresco.c b/client/cmdlfpresco.c index e6ac19e4f..20b42bc1a 100644 --- a/client/cmdlfpresco.c +++ b/client/cmdlfpresco.c @@ -212,6 +212,7 @@ static command_t CommandTable[] = { }; int CmdLFPresco(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdlft55xx.c b/client/cmdlft55xx.c index 7684bcc72..d104d7d77 100644 --- a/client/cmdlft55xx.c +++ b/client/cmdlft55xx.c @@ -1550,11 +1550,12 @@ static command_t CommandTable[] = { }; int CmdLFT55XX(const char *Cmd) { - CmdsParse(CommandTable, Cmd); - return 0; + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } int CmdHelp(const char *Cmd) { - CmdsHelp(CommandTable); - return 0; + CmdsHelp(CommandTable); + return 0; } diff --git a/client/cmdlfti.c b/client/cmdlfti.c index 66b2cd8b3..29168787d 100644 --- a/client/cmdlfti.c +++ b/client/cmdlfti.c @@ -298,11 +298,12 @@ static command_t CommandTable[] = { }; int CmdLFTI(const char *Cmd){ - CmdsParse(CommandTable, Cmd); - return 0; + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } int CmdHelp(const char *Cmd){ - CmdsHelp(CommandTable); - return 0; + CmdsHelp(CommandTable); + return 0; } diff --git a/client/cmdlfviking.c b/client/cmdlfviking.c index 6d3362f70..b91aced8e 100644 --- a/client/cmdlfviking.c +++ b/client/cmdlfviking.c @@ -126,6 +126,7 @@ static command_t CommandTable[] = { }; int CmdLFViking(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdscript.c b/client/cmdscript.c index 730f4e96a..b8c971581 100644 --- a/client/cmdscript.c +++ b/client/cmdscript.c @@ -98,10 +98,10 @@ int CmdList(const char *Cmd) * @param Cmd * @return */ -int CmdScript(const char *Cmd) -{ - CmdsParse(CommandTable, Cmd); - return 0; +int CmdScript(const char *Cmd) { + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } /** * Utility to check the ending of a string (used to check file suffix)