cdr_pgsql: Fix CLI "cdr show pgsql status" command.
authorRodrigo Ramírez Norambuena <decipher.hk@gmail.com>
Sun, 12 Apr 2015 14:08:30 +0000 (11:08 -0300)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 14 Apr 2015 15:56:32 +0000 (10:56 -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

cdr/cdr_pgsql.c

index 0c025ad..310411c 100644 (file)
@@ -143,7 +143,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) {