struct sockaddr_un sa;
int status;
- if (path == NULL)
- path = RRDD_SOCK_PATH;
+ assert (path != NULL);
pthread_mutex_lock (&lock);
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:")));
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);
#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);
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: "
}
if (config_listen_address_list_len < 1)
- open_listen_socket (RRDD_SOCK_PATH);
+ open_listen_socket (RRDCACHED_DEFAULT_ADDRESS);
if (listen_fds_num < 1)
{