[rrd-developers] [PATCH 2/2] rename rrdc_flush to rrdc_flush_file

kevin brintnall kbrint at rufus.net
Fri Mar 27 00:23:48 CET 2009


This prevents confusion with "rrd_flush".
---
 src/librrd.sym.in.in |    2 +-
 src/rrd_client.c     |   10 +++++-----
 src/rrd_client.h     |    4 ++--
 src/rrd_flush.c      |    2 +-
 src/rrd_graph.c      |    4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/librrd.sym.in.in b/src/librrd.sym.in.in
index 31da155..ba0d46c 100644
--- a/src/librrd.sym.in.in
+++ b/src/librrd.sym.in.in
@@ -53,7 +53,7 @@ rrd_xport
 rrdc_connect
 rrdc_is_connected
 rrdc_disconnect
-rrdc_flush
+rrdc_flush_file
 rrdc_stats_free
 rrdc_stats_get
 rrdc_update
diff --git a/src/rrd_client.c b/src/rrd_client.c
index 8e60664..d7104aa 100644
--- a/src/rrd_client.c
+++ b/src/rrd_client.c
@@ -559,7 +559,7 @@ int rrdc_update (const char *filename, int values_num, /* {{{ */
   return (status);
 } /* }}} int rrdc_update */
 
-int rrdc_flush (const char *filename) /* {{{ */
+int rrdc_flush_file (const char *filename) /* {{{ */
 {
   char buffer[4096];
   char *buffer_ptr;
@@ -602,7 +602,7 @@ int rrdc_flush (const char *filename) /* {{{ */
   response_free (res);
 
   return (status);
-} /* }}} int rrdc_flush */
+} /* }}} int rrdc_flush_file */
 
 
 /* convenience function; if there is a daemon specified, or if we can
@@ -617,18 +617,18 @@ int rrdc_flush_if_daemon (const char *opt_daemon, const char *filename) /* {{{ *
   if (rrdc_is_connected(opt_daemon))
   {
     rrd_clear_error();
-    status = rrdc_flush (filename);
+    status = rrdc_flush_file (filename);
 
     if (status != 0 && !rrd_test_error())
     {
       if (status > 0)
       {
-        rrd_set_error("rrdc_flush (%s) failed: %s",
+        rrd_set_error("rrdc_flush_file (%s) failed: %s",
                       filename, rrd_strerror(status));
       }
       else if (status < 0)
       {
-        rrd_set_error("rrdc_flush (%s) failed with status %i.",
+        rrd_set_error("rrdc_flush_file (%s) failed with status %i.",
                       filename, status);
       }
     }
diff --git a/src/rrd_client.h b/src/rrd_client.h
index 90b78f8..a6e861d 100644
--- a/src/rrd_client.h
+++ b/src/rrd_client.h
@@ -55,14 +55,14 @@ int rrdc_disconnect (void);
 int rrdc_update (const char *filename, int values_num,
         const char * const *values);
 
-int rrdc_flush (const char *filename);
+int rrdc_flush_file (const char *filename);
 int rrdc_flush_if_daemon (const char *opt_daemon, const char *filename);
 
 #else
 #	define rrdc_flush_if_daemon(a,b) 0
 #	define rrdc_connect(a) 0
 #	define rrdc_is_connected(a) 0
-#	define rrdc_flush(a) 0
+#	define rrdc_flush_file(a) 0
 #	define rrdc_update(a,b,c) 0
 #endif
 
diff --git a/src/rrd_flush.c b/src/rrd_flush.c
index bbaf826..35250a1 100644
--- a/src/rrd_flush.c
+++ b/src/rrd_flush.c
@@ -89,7 +89,7 @@ int rrd_flush (int argc, char **argv)
     status = 0;
     for (int i = optind; i < argc; i++)
     {
-        status = rrdc_flush(argv[i]);
+        status = rrdc_flush_file(argv[i]);
         if (status)
         {
             char *error;
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index eb90952..537f921 100644
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
@@ -861,10 +861,10 @@ int data_fetch(
 
                 if (status == 0)
                 {
-                    status = rrdc_flush (im->gdes[i].rrd);
+                    status = rrdc_flush_file (im->gdes[i].rrd);
                     if (status != 0)
                     {
-                        rrd_set_error ("rrdc_flush (%s) failed with status %i.",
+                        rrd_set_error ("rrdc_flush_file (%s) failed with status %i.",
                                 im->gdes[i].rrd, status);
                         return (-1);
                     }
-- 
1.6.1.3



More information about the rrd-developers mailing list