src/rrdd.c: Remove an unused variable.
[rrdd.git] / src / rrdd.c
index 7cd2431..6b382df 100644 (file)
@@ -29,8 +29,6 @@
 # define RRDD_LOG(severity, ...) syslog ((severity), __VA_ARGS__)
 #endif
 
-#define DEFAULT_PORT "42217"
-
 /*
  * Types
  */
@@ -548,7 +546,6 @@ static int open_listen_socket (const char *addr) /* {{{ */
   for (ai_ptr = ai_res; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next)
   {
     int fd;
-    struct sockaddr_storage sa;
     listen_socket_t *temp;
 
     temp = (listen_socket_t *) realloc (listen_fds,
@@ -626,6 +623,9 @@ static void *listen_thread_main (void *args) /* {{{ */
     open_listen_socket (config_listen_address_list[i]);
   }
 
+  if (config_listen_address_list_len < 1)
+    open_listen_socket (RRDD_SOCK_PATH);
+
   if (listen_fds_num < 1)
   {
     RRDD_LOG (LOG_ERR, "listen_thread_main: No listen sockets "