#define RECURSOR_SOCKET LOCALSTATEDIR"/run/pdns_recursor.controlsocket"
#define RECURSOR_COMMAND "get noerror-answers nxdomain-answers " \
"servfail-answers sys-msec user-msec qa-latency cache-entries cache-hits " \
- "cache-misses questions\n"
+ "cache-misses questions \n"
struct list_item_s;
typedef struct list_item_s list_item_t;
struct sockaddr_un sa_unix = { 0 };
- struct timeval stv_timeout;
cdtime_t cdt_timeout;
sd = socket (PF_UNIX, item->socktype, 0);
if (cdt_timeout < TIME_T_TO_CDTIME_T (2))
cdt_timeout = TIME_T_TO_CDTIME_T (2);
- CDTIME_T_TO_TIMEVAL (cdt_timeout, &stv_timeout);
-
- status = setsockopt (sd, SOL_SOCKET, SO_RCVTIMEO, &stv_timeout, sizeof (stv_timeout));
+ status = setsockopt (sd, SOL_SOCKET, SO_RCVTIMEO,
+ &CDTIME_T_TO_TIMEVAL(cdt_timeout),
+ sizeof(struct timeval));
if (status != 0)
{
SOCK_ERROR ("setsockopt", sa_unix.sun_path);