From c2ef8373c73cc56816ce00349a1b5fe7b1401ccd Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Fri, 22 Apr 2005 03:29:03 +0000 Subject: [PATCH] report the number of rows updated when using RealTime update method (bug #4066) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5496 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_realtime.c | 2 +- res/res_config_odbc.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/app_realtime.c b/apps/app_realtime.c index d6450739b6..7a1a63d4a5 100755 --- a/apps/app_realtime.c +++ b/apps/app_realtime.c @@ -87,7 +87,7 @@ static int cli_update_realtime(int fd, int argc, char **argv) { return RESULT_SUCCESS; } - ast_cli(fd, "Updated RealTime record.\n"); + ast_cli(fd, "Updated %i RealTime record(s).\n", res); return RESULT_SUCCESS; } diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c index cc31016d7a..484741ec7e 100755 --- a/res/res_config_odbc.c +++ b/res/res_config_odbc.c @@ -402,8 +402,9 @@ static int update_odbc(const char *database, const char *table, const char *keyf return -1; } - if (rowcount) - return 0; + if (rowcount >= 0) + return (int)rowcount; + return -1; }