report the number of rows updated when using RealTime update method (bug #4066)
authorKevin P. Fleming <kpfleming@digium.com>
Fri, 22 Apr 2005 03:29:03 +0000 (03:29 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Fri, 22 Apr 2005 03:29:03 +0000 (03:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5496 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_realtime.c
res/res_config_odbc.c

index d645073..7a1a63d 100755 (executable)
@@ -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;
 }
index cc31016..484741e 100755 (executable)
@@ -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;
 }