[Asterisk-code-review] res_indications: Fix indications remove command autocomplete (...asterisk[13])

Friendly Automation asteriskteam at digium.com
Mon Apr 22 08:48:50 CDT 2019


Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11298 )

Change subject: res_indications: Fix indications remove command autocomplete
......................................................................

res_indications: Fix indications remove command autocomplete

We changed the validation of autocomplete parameter in the "indications
remove" command to avoid continue the execution of the command after
asking for autocomplete out of range parameters.

ASTERISK-28391
Reported by: lmendes86

Change-Id: I92b24131fd02f2e3c7fec966eea6f7a663310d40
---
M main/indications.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/main/indications.c b/main/indications.c
index f193792..622f98d 100644
--- a/main/indications.c
+++ b/main/indications.c
@@ -780,9 +780,11 @@
 	case CLI_GENERATE:
 		if (a->pos == 2) {
 			return complete_country(a);
-		} else if (a->pos == 3) {
+		}
+		if (a->pos == 3) {
 			return complete_indications(a);
 		}
+		return NULL;
 	}
 
 	if (a->argc != 3 && a->argc != 4) {

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11298
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I92b24131fd02f2e3c7fec966eea6f7a663310d40
Gerrit-Change-Number: 11298
Gerrit-PatchSet: 1
Gerrit-Owner: Lucas Mendes <lucas.mendes at wearespindle.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Lucas Mendes <lucas.mendes at wearespindle.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190422/b05ecbae/attachment.html>


More information about the asterisk-code-review mailing list