src/rrd_{fetch,graph,update}.c: Use the `RRDCACHED_ADDRESS' environment variable..
[rrdtool.git] / src / rrd_client.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);