]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
cdr_pgsql: Fix CLI "cdr show pgsql status" command. 08/108/1
authorRodrigo Ramírez Norambuena <decipher.hk@gmail.com>
Sun, 12 Apr 2015 14:08:30 +0000 (11:08 -0300)
committerMatt Jordan <mjordan@digium.com>
Tue, 14 Apr 2015 19:04:09 +0000 (14:04 -0500)
The command always showed the usage information.

* Fix the error in command validation for CLI_SHOWUSAGE.

ASTERISK-24959 #close
Reported by: Rodrigo Ramirez Norambuena

Change-Id: I584f0936bb01001336a468a55c1d05d79fe795d5
(cherry picked from commit 23a180cade51e84b9def65b05759c3cb9feba225)

cdr/cdr_pgsql.c

index 4b536abcc8122a9daec0917d631ac19bc3182d2c..c7a6644c6a1f1518fc54bccf45da1fa2be717635 100644 (file)
@@ -124,7 +124,7 @@ static char *handle_cdr_pgsql_status(struct ast_cli_entry *e, int cmd, struct as
                return NULL;
        }
 
-       if (a->argc != 3)
+       if (a->argc != e->args)
                return CLI_SHOWUSAGE;
 
        if (connected) {