[asterisk-commits] oej: branch oej/codename-appleraisin-trunk r176702 - /team/oej/codename-apple...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 17 15:55:21 CST 2009


Author: oej
Date: Tue Feb 17 15:55:20 2009
New Revision: 176702

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=176702
Log:
Bad placement of a function call. Now fixed.

Modified:
    team/oej/codename-appleraisin-trunk/main/db.c

Modified: team/oej/codename-appleraisin-trunk/main/db.c
URL: http://svn.digium.com/svn-view/asterisk/team/oej/codename-appleraisin-trunk/main/db.c?view=diff&rev=176702&r1=176701&r2=176702
==============================================================================
--- team/oej/codename-appleraisin-trunk/main/db.c (original)
+++ team/oej/codename-appleraisin-trunk/main/db.c Tue Feb 17 15:55:20 2009
@@ -428,12 +428,17 @@
 
 static void handle_cli_database_show_realtime(struct ast_cli_args *a, const char *key)
 {
-	dbinit();
-	struct ast_variable *resultset = db_realtime_getall(key);
+	struct ast_variable *resultset;
 	struct ast_variable *cur;
 	int counter = 0;
 
-	cur = resultset;
+	dbinit();
+	if (!db_rt) {
+		ast_cli(a->fd, "Error: Can't connect to astdb/realtime\n");
+		return;
+	}
+
+	cur = resultset = db_realtime_getall(key);
 	while (cur) {
 		ast_cli(a->fd, "%-50s: %-25s\n", cur->name, cur->value);
 		cur = cur->next;




More information about the asterisk-commits mailing list