src/rrd_client.h: Renamed the defines to be more consistent with other names.
authorFlorian Forster <octo@verplant.org>
Wed, 25 Jun 2008 11:59:28 +0000 (13:59 +0200)
committerFlorian Forster <octo@verplant.org>
Wed, 25 Jun 2008 11:59:28 +0000 (13:59 +0200)
src/rrd_client.c
src/rrd_client.h
src/rrd_daemon.c

index 4449a01..d9a7468 100644 (file)
@@ -178,8 +178,7 @@ static int rrdc_connect_unix (const char *path) /* {{{ */
   struct sockaddr_un sa;
   int status;
 
-  if (path == NULL)
-    path = RRDD_SOCK_PATH;
+  assert (path != NULL);
 
   pthread_mutex_lock (&lock);
 
@@ -222,7 +221,7 @@ int rrdc_connect (const char *addr) /* {{{ */
   int status;
 
   if (addr == NULL)
-    addr = RRDD_SOCK_PATH;
+    addr = RRDCACHED_DEFAULT_ADDRESS;
 
   if (strncmp ("unix:", addr, strlen ("unix:")) == 0)
     return (rrdc_connect_unix (addr + strlen ("unix:")));
@@ -246,7 +245,7 @@ int rrdc_connect (const char *addr) /* {{{ */
   ai_hints.ai_socktype = SOCK_STREAM;
 
   ai_res = NULL;
-  status = getaddrinfo (addr, DEFAULT_PORT, &ai_hints, &ai_res);
+  status = getaddrinfo (addr, RRDCACHED_DEFAULT_PORT, &ai_hints, &ai_res);
   if (status != 0)
   {
     pthread_mutex_unlock (&lock);
index aa80e59..003c4e4 100644 (file)
@@ -22,8 +22,8 @@
 #ifndef __RRD_CLIENT_H
 #define __RRD_CLIENT_H 1
 
-#define RRDD_SOCK_PATH "unix:/tmp/rrdd.sock"
-#define DEFAULT_PORT "42217"
+#define RRDCACHED_DEFAULT_ADDRESS "unix:/tmp/rrdd.sock"
+#define RRDCACHED_DEFAULT_PORT "42217"
 
 int rrdc_connect (const char *addr);
 int rrdc_disconnect (void);
index 4def10c..9712fcd 100644 (file)
@@ -846,7 +846,7 @@ static int open_listen_socket (const char *addr) /* {{{ */
   ai_hints.ai_socktype = SOCK_STREAM;
 
   ai_res = NULL;
-  status = getaddrinfo (addr, DEFAULT_PORT, &ai_hints, &ai_res);
+  status = getaddrinfo (addr, RRDCACHED_DEFAULT_PORT, &ai_hints, &ai_res);
   if (status != 0)
   {
     RRDD_LOG (LOG_ERR, "open_listen_socket: getaddrinfo(%s) failed: "
@@ -934,7 +934,7 @@ static void *listen_thread_main (void *args __attribute__((unused))) /* {{{ */
   }
 
   if (config_listen_address_list_len < 1)
-    open_listen_socket (RRDD_SOCK_PATH);
+    open_listen_socket (RRDCACHED_DEFAULT_ADDRESS);
 
   if (listen_fds_num < 1)
   {